django-rq
django-rq copied to clipboard
how to setup custom exception handler?
Here is my code, but it doesn't work.
settings.py:
RQ_EXCEPTION_HANDLERS=['path.to.handler']
def handler(job, exc_type, exc_value, traceback):
callback = job.kwargs['callback']
callback(exc_type, exc_value, traceback)
I also have a similar setup and my error handler is not called. I also wrote a unit test and indeed the error handler is not called. Any help?