mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Improve job management. Remove archived flag.
This commit is contained in:
@@ -23,7 +23,6 @@ class RenderJob:
|
||||
self.scheduled_start = None
|
||||
self.renderer = renderer
|
||||
self.name = name or os.path.basename(input_path) + '_' + self.date_created.isoformat()
|
||||
self.archived = False
|
||||
|
||||
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')
|
||||
@@ -35,7 +34,9 @@ class RenderJob:
|
||||
return self.worker.status
|
||||
|
||||
def file_hash(self):
|
||||
return hashlib.md5(open(self.worker.input_path, 'rb').read()).hexdigest()
|
||||
if os.path.exists(self.worker.input_path):
|
||||
return hashlib.md5(open(self.worker.input_path, 'rb').read()).hexdigest()
|
||||
return None
|
||||
|
||||
def json_safe_copy(self):
|
||||
"""Converts RenderJob into JSON-friendly dict"""
|
||||
|
||||
Reference in New Issue
Block a user