mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Fix some issues around adding jobs through local rest call
This commit is contained in:
@@ -22,7 +22,7 @@ class RenderJob:
|
||||
self.date_created = datetime.now()
|
||||
self.scheduled_start = None
|
||||
self.renderer = renderer
|
||||
self.name = name or os.path.basename(input_path) + '_' + self.date_created.isoformat()
|
||||
self.name = name or os.path.basename(input_path) + '_' + self.date_created.strftime("%Y.%m.%d_%H.%M.%S")
|
||||
|
||||
self.worker = RenderWorkerFactory.create_worker(renderer, input_path, output_path, args)
|
||||
self.worker.log_path = os.path.join(os.path.dirname(input_path), self.name + '.log')
|
||||
@@ -45,7 +45,7 @@ class RenderJob:
|
||||
try:
|
||||
job_dict = self.__dict__.copy()
|
||||
job_dict['status'] = self.render_status().value
|
||||
job_dict['file_hash'] = self.file_hash if isinstance(self.file_hash, str) else self.file_hash()
|
||||
job_dict['file_hash'] = self.file_hash if self.file_hash and isinstance(self.file_hash, str) else self.file_hash()
|
||||
job_dict['worker'] = self.worker.__dict__.copy()
|
||||
job_dict['worker']['status'] = job_dict['status']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user