Register our extra queue using celery signals
@@ -6,6 +6,7 @@ import socket
import celery
import raven
+from celery.signals import celeryd_init
from raven.contrib.celery import register_logger_signal, register_signal
logger = logging.getLogger(__name__)
@@ -47,6 +48,9 @@ def wrap_send(cls):
cls._send.__klass__ = cls()
return cls
+
+@celeryd_init.connect
+def configure_workers(sender=None, conf=None, **kwargs):
# To enable triggering config writes and reloads on a specific Prometheus server
# we automatically create a queue for the current server that we can target from
# our promgen.prometheus functions
