Skip to content

Commit

Permalink
Log response from the dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKrughoff committed Sep 2, 2021
1 parent 8f81bb6 commit 7ad6fad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions python/lsst/verify/bin/dispatchverify.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,10 @@ def main():
# Upload job
if not config.test:
log.info('Uploading Job JSON to {0}.'.format(config.api_url))
job.dispatch(api_user=config.api_user,
api_password=config.api_password,
api_url=config.api_url)
response = job.dispatch(api_user=config.api_user,
api_password=config.api_password,
api_url=config.api_url)
log.info(response['message'])

if config.show_json:
print(json.dumps(job.json,
Expand Down
9 changes: 7 additions & 2 deletions python/lsst/verify/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ def dispatch(self, api_user=None, api_password=None,
API password.
**kwargs : optional
Additional keyword arguments passed to `lsst.verify.squash.post`.
Returns
-------
output : response
The response from the POST request to the SQuaSH API
"""
full_json_doc = self.json
# subset JSON to just the 'job' fields; no metrics and specs
Expand All @@ -328,8 +333,8 @@ def dispatch(self, api_user=None, api_password=None,
access_token = squash.get_access_token(api_url, api_user,
api_password)

squash.post(api_url, 'job', json_doc=job_json,
access_token=access_token, **kwargs)
return squash.post(api_url, 'job', json_doc=job_json,
access_token=access_token, **kwargs)

def report(self, name=None, spec_tags=None, metric_tags=None):
r"""Create a verification report that lists the pass/fail status of
Expand Down

0 comments on commit 7ad6fad

Please sign in to comment.