Skip to content

Commit

Permalink
Add run_id to a few messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vondele authored and ppigazzini committed Aug 24, 2023
1 parent cf3f761 commit 7363126
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/fishtest/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,19 +1322,19 @@ def stop_run(self, run_id):
def approve_run(self, run_id, approver):
run = self.get_run(run_id)
if run is None:
return None, "Run not found!"
return None, f"Run {str(run_id)} not found!"
# Can't self approve
if run["args"]["username"] == approver:
return None, "Self approval is disabled!"
return None, f"Run {str(run_id)}: Self approval is disabled!"
# Only one approval per run
if not run["approved"]:
run["approved"] = True
run["approver"] = approver
self.buffer(run, True)
self.task_time = 0
return run, "Run approved"
return run, f"Run {str(run_id)} approved"
else:
return None, "Run already approved!"
return None, f"Run {str(run_id)} already approved!"

def purge_run(self, run, p=0.001, res=7.0, iters=1):
# Only purge finished runs
Expand Down

0 comments on commit 7363126

Please sign in to comment.