Skip to content

Commit

Permalink
Temporary workaround for #115
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Neff <[email protected]>
  • Loading branch information
andyneff committed Dec 2, 2021
1 parent 3eb29b8 commit 32cbcb2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions terra/executor/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@
class ProcessPoolExecutor(concurrent.futures.ProcessPoolExecutor,
terra.executor.base.BaseExecutor):
multiprocess = True
def __init__(self, *args, **kwargs):
# Workaround for https://github.com/VisionSystemsInc/terra/issues/115 the
# simplest workaround was to pre-finalize celery and pre-cache the property
# app.tasks, as these were the components with locks that were causing
# deadlocks
from celery import _state
_state.get_current_app().tasks
return super().__init__(*args, **kwargs)

0 comments on commit 32cbcb2

Please sign in to comment.