'celery: daemonic processes are not allowed to have children (with concurrent.futures)
In Python (3.6) I try to create processes (with multiprocessing) in a celery task (celery 3.1.17) but it gives the error:
daemonic processes are not allowed to have children
code
def mp():
with concurrent.futures.ProcessPoolExecutor(max_workers=90) as executor:
data = executor.map(pdfocr,[no for no in list(json.keys())])
Solution 1:[1]
Start worker with -P threads argument:
celery worker -P threads
Celery version >= 4.4.0 has been officially supported
Refer: https://github.com/celery/celery/issues/4525#issuecomment-566503932
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
