mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
stop workers from propagating logs
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging as real_logging
|
||||
import os
|
||||
import secrets
|
||||
import string
|
||||
@@ -36,6 +37,9 @@ class NotifyCelery(Celery):
|
||||
|
||||
# Configure Celery app with options from the main app config.
|
||||
self.config_from_object(app.config["CELERY"])
|
||||
self.conf.worker_hijack_root_logger = False
|
||||
logger = real_logging.getLogger("celery")
|
||||
logger.propagate = False
|
||||
|
||||
def send_task(self, name, args=None, kwargs=None, **other_kwargs):
|
||||
other_kwargs["headers"] = other_kwargs.get("headers") or {}
|
||||
|
||||
Reference in New Issue
Block a user