Fix issue where dead jobs try to be started after restarting

This commit is contained in:
Brett Williams
2023-05-27 21:53:34 -05:00
parent e300024e2b
commit 528c802fe2
2 changed files with 8 additions and 3 deletions

View File

@@ -133,6 +133,7 @@ class RenderQueue:
scheduled = cls.jobs_with_status(RenderStatus.SCHEDULED, priority_sorted=True)
for job in scheduled:
if job.scheduled_start <= datetime.now():
logger.debug(f"Starting scheduled job: {job}")
cls.start_job(job)
if cls.last_saved_counts != cls.job_counts():