diff --git a/app/config.py b/app/config.py index 0d29a02d1..697982ac4 100644 --- a/app/config.py +++ b/app/config.py @@ -336,7 +336,9 @@ class Config(object): 'options': {'queue': QueueNames.PERIODIC} }, } - CELERY_QUEUES = [] + + # this is overriden by the -Q command, but locally, we should read from all queues + CELERY_QUEUES = [Queue(queue, Exchange('default'), routing_key=queue) for queue in QueueNames.all_queues()] FROM_NUMBER = 'development' @@ -427,11 +429,6 @@ class Development(Config): ANTIVIRUS_ENABLED = os.getenv('ANTIVIRUS_ENABLED') == '1' - for queue in QueueNames.all_queues(): - Config.CELERY_QUEUES.append( - Queue(queue, Exchange('default'), routing_key=queue) - ) - API_HOST_NAME = "http://localhost:6011" API_RATE_LIMIT_ENABLED = True DVLA_EMAIL_ADDRESSES = ['success@simulator.amazonses.com'] @@ -469,11 +466,6 @@ class Test(Development): ANTIVIRUS_ENABLED = True - for queue in QueueNames.all_queues(): - Config.CELERY_QUEUES.append( - Queue(queue, Exchange('default'), routing_key=queue) - ) - API_RATE_LIMIT_ENABLED = True API_HOST_NAME = "http://localhost:6011"