Fixed saving / loading render status states

This commit is contained in:
Brett Williams
2023-05-24 13:06:15 -05:00
parent 2a7eddb1eb
commit 8a3854a51e
2 changed files with 8 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ class RenderStatus(Enum):
CANCELLED = "cancelled"
ERROR = "error"
SCHEDULED = "scheduled"
UNDEFINED = "undefined"
def string_to_status(string):
@@ -244,6 +245,7 @@ class BaseRenderWorker(object):
worker_data = self.__dict__.copy()
worker_data['percent_complete'] = self.percent_complete()
worker_data['time_elapsed'] = self.time_elapsed()
worker_data['status'] = self.status.value
keys_to_remove = ['thread', 'process'] # remove unwanted keys from dict
for key in worker_data.keys():
if key.startswith('_'):