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