0
votes

I am using celery 4.2.1 with python 3.5. My multiprocessing code is below:

import multiprocessing
from multiprocessing.managers import BaseManager

class MyManager(BaseManager):
    pass

MyManager.register(str("Conns"), ConnClass)
multiprocessing.freeze_support()

if __name__ == 'tasks':
    multiprocessing.freeze_support()
    mana = MyManager()
    mana.start()
    glob = mana.Conns()

This work on Ubuntu 16.04 but not working on WINDOWS 7. Getting below error

mana.start() File "c:\users\seshabhattar\appdata\local\programs\python\python35\Lib\multiprocessing\managers.py", line 479, in start self._process.start()

File "c:\users\seshabhattar\appdata\local\programs\python\python35\Lib\multiprocessing\process.py", line 103, in start

'daemonic processes are not allowed to have children'

AssertionError: daemonic processes are not allowed to have children

1

1 Answers

0
votes

I got a similar Error trying to call a multiprocessing function from a Celery task in django. I solved using billiard instead of multiprocessing

import billiard as multiprocessing

Hope it helps.