rq / django-rq

A simple app that provides django integration for RQ (Redis Queue)
MIT License
1.83k stars 286 forks source link

how to setup custom exception handler? #459

Open qxrftz opened 3 years ago

qxrftz commented 3 years ago

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)
dapicester commented 2 years ago

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?