Persist args in db and return args in job json (#82)

This commit is contained in:
2024-08-03 18:42:21 -05:00
committed by GitHub
parent abc9724f01
commit 82613c3963
2 changed files with 8 additions and 4 deletions

View File

@@ -39,6 +39,7 @@ class BaseRenderWorker(Base):
end_frame = Column(Integer, nullable=True)
parent = Column(String, nullable=True)
children = Column(MutableDict.as_mutable(JSON))
args = Column(MutableDict.as_mutable(JSON))
name = Column(String)
file_hash = Column(String)
_status = Column(String)
@@ -288,6 +289,8 @@ class BaseRenderWorker(Base):
self.status = RenderStatus.CANCELLED
def percent_complete(self):
if self.status == RenderStatus.COMPLETED:
return 1.0
return 0
def _parse_stdout(self, line):
@@ -329,7 +332,8 @@ class BaseRenderWorker(Base):
'end_frame': self.end_frame,
'total_frames': self.total_frames,
'last_output': getattr(self, 'last_output', None),
'log_path': self.log_path()
'log_path': self.log_path(),
'args': self.args
}
# convert to json and back to auto-convert dates to iso format