Skip to content

Commit

Permalink
change to one-line extract job
Browse files Browse the repository at this point in the history
Co-authored-by: Gerard Segarra <[email protected]>
  • Loading branch information
duhow and gerardsegarra authored Apr 23, 2024
1 parent 4fee9b4 commit 3b70e38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ def monitor_queued_jobs():
if not jobs:
return

old_queued_job = min(jobs.items(), key=lambda x: x[1])
job_id, time_start = old_queued_job
job_id, time_start = min(jobs.items(), key=lambda x: x[1])
delay = datetime.now().timestamp() - time_start

if delay <= int(os.getenv("QUEUED_JOBS_DELAY_THRESHOLD", 150)):
Expand Down

0 comments on commit 3b70e38

Please sign in to comment.