django-rq icon indicating copy to clipboard operation
django-rq copied to clipboard

Feature to support graceful timeout

Open Salaah01 opened this issue 3 years ago • 1 comments

Let's suppose a context manager exists inside a function which is being run as part of the job. If the job times out, the cleanup __exit__ code isn't executed and the entire job is killed.

Can I request a feature where we have a graceful_timeout parameter as well as a timeout parameter. The idea being that graceful_timeout causes an normal interruption whereas the timeout continues to completely kill the program.

That will then give the program time to run some clean up code.

Salaah01 avatar Apr 14 '23 08:04 Salaah01

I'd love to have this feature if it can be implemented in a clean way. This would need to be implemented in RQ first though. Mind opening an issue http://github.com/rq/rq ?

selwin avatar May 02 '23 02:05 selwin