It would be very convenient to have the option to restart a worker process once it hits a certain threshold, such as memory consumption or number of tasks processed. In long-running deployments, this can help with things such as memory leaks that are out of control of the application.
It would be very convenient to have the option to restart a worker process once it hits a certain threshold, such as memory consumption or number of tasks processed. In long-running deployments, this can help with things such as memory leaks that are out of control of the application.
Celery allows this with their
worker_max_tasks_per_child
andworker_max_memory_per_child
, which I default all my celery deployments to. Migrating to saq, this has been a bit of a holdup.If this is something you'd consider adding, I'd be happy to contribute a PR :)