Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
标准的 Django 日志设置不会捕获Huey任务中的异常日志。
这意味着默认情况下重要任务会静默失败。
如何确保记录异常?
您需要将huey记录器添加到您的settings.LOGGING. 例如:
huey
settings.LOGGING
# settings.py ... LOGGING = { ... 'loggers': { ... 'huey': { 'handlers': ['error', 'mail_admins'], 'level': 'ERROR', 'propagate': False }, }, ... }