Closed gaborbernat closed 4 years ago
Can you provide a little more information so I can try and replicate this? The tests are run against 3.8: https://travis-ci.org/coleifer/huey/jobs/616785290
The example (using processes) seems to be running just fine under 3.8:
If you can provide more information so I can replicate or debug this, I will gladly reopen.
I've ran into this with pyenv on Mac. 🤔 It still does the above thing for me.
I think it may be related: https://bugs.python.org/issue33884 -- which was closed. I'd suggest making a small modification in your code to try and explicitly set the multiprocessing start mode to 'fork':
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.set_start_method
You can put it alongside where you declare your huey
instance.
See also here: https://github.com/sphinx-doc/sphinx/issues/6803#issuecomment-554704033
Added workaround to consumer entry-point: bf002c85ae444954c3237fa4b056fbf9111448a1
@coleifer I am facing the same on MAC Pyhton 3.11.5
For some reason your environment is using the spawn
method. There is a workaround in the huey_consumer.py
entrypoint here, but it looks like you are not using it: https://github.com/coleifer/huey/blob/master/huey/bin/huey_consumer.py#L60-L65
Just add the code from above to whatever you are using for your entrypoint to your application and you should be set.
For a service that works perfectly under python3.7 fails under python 3.8: