Save worker information to database for persistence across runs and abstract away data source

This commit is contained in:
Brett Williams
2023-05-24 12:50:16 -05:00
parent e11c5e7e58
commit 2a7eddb1eb
3 changed files with 41 additions and 29 deletions

View File

@@ -242,6 +242,8 @@ class BaseRenderWorker(object):
def json(self):
worker_data = self.__dict__.copy()
worker_data['percent_complete'] = self.percent_complete()
worker_data['time_elapsed'] = self.time_elapsed()
keys_to_remove = ['thread', 'process'] # remove unwanted keys from dict
for key in worker_data.keys():
if key.startswith('_'):