django-rq
django-rq copied to clipboard
Feature to support graceful timeout
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.
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 ?