Browse Source

Fixed issue where task resources were not freed in case of error during the task

master
Youen 10 months ago
parent
commit
914c5c43f9
  1. 2
      src/web_utils/task.py

2
src/web_utils/task.py

@ -143,9 +143,11 @@ class Task:
self.__thread.start()
def __run(self):
try:
self.run()
print('Task ' + self.task_id + ' has finished')
self.__finished_at = datetime.now()
finally:
Task.__free_resources(self)
Task.__update_pending_tasks()

Loading…
Cancel
Save