Skip to content

Commit

Permalink
Return download job status as PENDING on initial request (#11)
Browse files Browse the repository at this point in the history
When a reqest to /api/reports/download/<report_id> is made initially,
the status field will be set to PENDING
  • Loading branch information
erssebaggala authored May 20, 2019
1 parent a592d58 commit c0b6300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions btsapi/modules/reports/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def download_report(report_id):
body=data)
channel.close()

return jsonify({'status': 'success',
'message': 'Download request received.',
return jsonify({'status': 'PENDING', # Job status
'message': 'Download job logged.',
'status_url': '/api/reports/download/status/{}'.format(task_id),
'download_url': '/api/reports/file/{}'.format(task_id)} )
except Exception as e:
Expand Down

0 comments on commit c0b6300

Please sign in to comment.