Skip to content

Commit

Permalink
Allow checking the status of non-running experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
NaniteBased committed Nov 4, 2021
1 parent 282d1b4 commit 7c386b0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Scheduler/execution/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ def view(executionId: int):

@bp.route('<int:executionId>/json')
def json(executionId: int):
execution = ExecutionQueue.Find(executionId)
execution = executionOrTombstone(executionId)
coarse = status = 'ERR'
percent = 0
messages = []
if execution is not None:
coarse = execution.CoarseStatus.name
status = execution.Status
percent = execution.PerCent
messages = execution.Messages
if isinstance(execution, Tombstone):
status = "Not Running"
else:
status = execution.Status
percent = execution.PerCent
messages = execution.Messages
return jsonify({
'Coarse': coarse, 'Status': status,
'PerCent': percent, 'Messages': messages
Expand Down

0 comments on commit 7c386b0

Please sign in to comment.