Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python : Celery, How can I make it run in background?

I use celery, with python 3 and supervisor in Ubuntu.

I've been working to make a new API, which will get an image from the internet using PIL(Pillow) and save it in a server.

However the problem is that I use Celery as scheduler and in the original API it returns the result in a milisecond, but when I use PIL, the wait becomes almost a second.

So as a solution, I am looking for a way to make the Celery worker run in the background.

Is it possible?


1 Answers

What you probably want is to daemonize your Celery worker.

If you follow the steps provided in the Celery running the worker as a daemon documentation you will be able to do that.

It is a bit of a complicated process, but it will allow the Celery worker to run in the background

like image 177
John Moutafis Avatar answered Oct 18 '25 05:10

John Moutafis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!