Close the session properly - part 2

This commit is contained in:
Brett Williams
2023-11-11 10:59:39 -06:00
parent 86c5d4cc15
commit 0e0eba7b22

View File

@@ -88,10 +88,11 @@ class RenderQueue:
@classmethod
def prepare_for_shutdown(cls):
logger.debug("Closing session")
running_jobs = cls.jobs_with_status(RenderStatus.RUNNING) # cancel all running jobs
for job in running_jobs:
cls.cancel_job(job)
[cls.cancel_job(job) for job in running_jobs]
cls.save_state()
cls.session.close()
@classmethod
def is_available_for_job(cls, renderer, priority=2):