Skip to content

Commit 32cbcb2

Browse files
committed
Temporary workaround for #115
Signed-off-by: Andy Neff <[email protected]>
1 parent 3eb29b8 commit 32cbcb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

terra/executor/process.py

+8
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@
77
class ProcessPoolExecutor(concurrent.futures.ProcessPoolExecutor,
88
terra.executor.base.BaseExecutor):
99
multiprocess = True
10+
def __init__(self, *args, **kwargs):
11+
# Workaround for https://github.com/VisionSystemsInc/terra/issues/115 the
12+
# simplest workaround was to pre-finalize celery and pre-cache the property
13+
# app.tasks, as these were the components with locks that were causing
14+
# deadlocks
15+
from celery import _state
16+
_state.get_current_app().tasks
17+
return super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)