mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +00:00
Fix scheduledjob render status
This commit is contained in:
@@ -82,13 +82,16 @@ class ScheduledJob(Base):
|
||||
def render_status(self):
|
||||
try:
|
||||
worker_status = RenderStatus(self.worker_data()['status'])
|
||||
if hasattr(self, 'worker_object'):
|
||||
if self.scheduled_start and worker_status == RenderStatus.NOT_STARTED:
|
||||
return RenderStatus.SCHEDULED
|
||||
else:
|
||||
return worker_status
|
||||
if worker_status == RenderStatus.RUNNING:
|
||||
return RenderStatus.ERROR
|
||||
except Exception as e:
|
||||
logger.error(f"Exception fetching render status: {e}")
|
||||
return RenderStatus.UNDEFINED
|
||||
worker_status = RenderStatus.UNDEFINED
|
||||
return worker_status
|
||||
|
||||
def json(self):
|
||||
"""Converts RenderJob into JSON-friendly dict"""
|
||||
|
||||
Reference in New Issue
Block a user