I want to use supervisor to run celery in production, but I am using python 3 instead of python 2. Is there a supervisor that supports python 3?
Also, is it possible to use python 2 to run supervisor for my python 3 code for celery?
supervisord
is just process manager, fact that itself uses python2 does not mean it can't run python3 application.
Just put your application in virtualenv created with python3.
$ virtualenv -p python3 myvenv
Activate that environment and install your app into it with celery as well. And in supervisor you will use full path to celery from inside that virtualenv.
e.g. I created my python3 virtualenv in /home/beezz/myvenv
then celery
will be located at /home/beezz/myenv/bin/celery
And here is virtualenv's documentation. In general it's good practice to keep applications in separate virtual environments.
If you are not tied to supervisord
somehow, circus is also nice process manager with some cool features and it's python3 ready.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With