Skip to content

Commit

Permalink
logging session_id, extracting request's completion info
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Jan 11, 2024
1 parent 9edd5f5 commit 0131de0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions oda_api/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ def inspect_state(obj, store, job_id, local, group_by_job):
for record in state['records']:
logger.info(f"job_id: {record['job_id']}")

Check warning on line 196 in oda_api/cli.py

View check run for this annotation

Codecov / codecov/patch

oda_api/cli.py#L195-L196

Added lines #L195 - L196 were not covered by tests
# TODO which information should be printed?
for job_status_data in record['job_id']:
request_completed = job_status_data['request_completed']
token_expired = job_status_data.get('token_expired', None)
scratch_dir_fn = job_status_data['scratch_dir_fn']
session_id = scratch_dir_fn.split('_')[2]
logger.info(f"\tsession_id: {session_id}")

Check warning on line 203 in oda_api/cli.py

View check run for this annotation

Codecov / codecov/patch

oda_api/cli.py#L198-L203

Added lines #L198 - L203 were not covered by tests

def main():
cli(obj={})
Expand Down

0 comments on commit 0131de0

Please sign in to comment.