Skip to content

Commit

Permalink
fix datetime timedelta
Browse files Browse the repository at this point in the history
  • Loading branch information
duhow committed Apr 23, 2024
1 parent 6a72055 commit ac61dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def monitor_queued_jobs():

queued_jobs = [job for job in jobs if job.action == "queued"]
job = min(queued_jobs, key=lambda x: x.time_start)
delay = int(datetime.now().timestamp() - job.time_start)
delay = (datetime.now() - job.time_start).seconds

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

0 comments on commit ac61dd5

Please sign in to comment.