Skip to content

Commit

Permalink
added includeKey to metadata to reduce size of response from Cromwell (
Browse files Browse the repository at this point in the history
  • Loading branch information
rsasch authored Mar 18, 2019
1 parent 846ddb6 commit 858e855
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixed bug where scattered tasks' status, duration, timing diagram and number of attempts were inaccurate.

### Limited the size of metadata response from Cromwell by using the `includeKey` option in order to reduce the likelihood of a time-out.

## v0.6.1 Release Notes

### Fixed bug where job IDs that started with a number could not be queried for.
Expand Down
14 changes: 12 additions & 2 deletions servers/cromwell/jobs/controllers/jobs_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,18 @@ def get_job(id, **kwargs):
:rtype: JobMetadataResponse
"""
url = '{cromwell_url}/{id}/metadata'.format(
cromwell_url=_get_base_url(), id=id)

include_keys = ('attempt', 'callCaching', 'callRoot', 'calls',
'description', 'end', 'executionEvents', 'executionStatus',
'failures', 'inputs', 'jobId', 'labels', 'outputs',
'parentWorkflowId', 'returnCode', 'shardIndex', 'start',
'status', 'stderr', 'stdout', 'submission',
'subWorkflowId', 'workflowName')

url = '{cromwell_url}/{id}/metadata?{query}'.format(
cromwell_url=_get_base_url(),
id=id,
query='includeKey=' + '&includeKey='.join(include_keys))
response = requests.get(
url, auth=kwargs.get('auth'), headers=kwargs.get('auth_headers'))

Expand Down

0 comments on commit 858e855

Please sign in to comment.