|
@@ -1,9 +1,16 @@
|
|
|
+import traceback
|
|
|
+
|
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
|
from time import time
|
|
|
from types import GeneratorType
|
|
|
-from typing import Callable, List, Generator, Optional, Any
|
|
|
-
|
|
|
-from eventlet import spawn_n, tpool
|
|
|
+from typing import Any
|
|
|
+from typing import Callable
|
|
|
+from typing import Generator
|
|
|
+from typing import List
|
|
|
+from typing import Optional
|
|
|
+
|
|
|
+from eventlet import spawn_n
|
|
|
+from eventlet import tpool
|
|
|
from eventlet.event import Event
|
|
|
from eventlet.queue import Queue
|
|
|
|
|
@@ -94,7 +101,7 @@ class JobRunner:
|
|
|
:return:
|
|
|
"""
|
|
|
for i in range(len(self.__jobs)):
|
|
|
- if self.__jobs[i].id == identifier:
|
|
|
+ if self.__jobs[i].identifier == identifier:
|
|
|
if self.__jobs[i].finished is not None:
|
|
|
job = self.__jobs[i]
|
|
|
del self.__jobs[i]
|
|
@@ -219,6 +226,7 @@ class JobRunner:
|
|
|
|
|
|
# save exceptions to show in ui
|
|
|
except Exception as exception:
|
|
|
+ traceback.print_exc()
|
|
|
job.exception = f'{type(exception).__name__} ({str(exception)})'
|
|
|
|
|
|
# remove from group dict
|