The standard Django logging setup doesn't catch logging of exceptions in a Huey task.
This means that important tasks fail silently by default.
How can I make sure the exceptions are logged?
You need to add a huey
logger to your settings.LOGGING
. For example:
# settings.py
...
LOGGING = {
...
'loggers': {
...
'huey': {
'handlers': ['error', 'mail_admins'],
'level': 'ERROR',
'propagate': False
},
},
...
}