|
|
|
|
|
by ThePhysicist
3943 days ago
|
|
If you find one, let me know ;) I'm looking for something myself currently. There's RQ (http://python-rq.org/) but it seems to have a similar design as Celery (just a simpler architecture) so it probably suffers from the same problem. A good solution would be to have a series of workers that can launch new independent Python processes for each task, e.g. using the subprocess module. |
|
I switched to rq and it's all been much easier. The behaviour is easy to understand and it's easy to inspect redis to see what's going on.
In terms of the code restart angle - I'm fairly sure you can effectively restart the workers. They run as a single process that forks to do work. Each copy you run only has a single worker, so you need to run multiple instances yourself. If you kill the parent it waits until the child has finished the job it is on before terminating.
I could be wrong about some of the details. I'd recommend giving it a shot. I must have run 100,000s of jobs through it now and I haven't had a single issue.
http://python-rq.org/docs/workers/