Skip to content
Snippets Groups Projects
Verified Commit 92c092f7 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Prevent Celery from overriding logging configuration

parent db80dfaf
No related branches found
No related tags found
1 merge request!1067Resolve "Celery does not honour logging configuration"
......@@ -4,7 +4,7 @@ from traceback import format_exception
from django.conf import settings
from celery import Celery
from celery.signals import task_failure
from celery.signals import setup_logging, task_failure
from .util.core_helpers import get_site_preferences
from .util.email import send_email
......@@ -35,3 +35,9 @@ def task_failure_notifier(
"traceback": "".join(format_exception(type(exception), exception, traceback)),
},
)
@setup_logging.connect
def on_setup_logging(*args, **kwargs):
"""Prevent Celery from overriding logging configuration."""
pass # noqa
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment