mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 08:09:49 -04:00
Ensure dev and test builds will read from old and new queues
This commit is contained in:
@@ -24,6 +24,23 @@ class QueueNames(object):
|
|||||||
NOTIFY = 'notify-internal-tasks'
|
NOTIFY = 'notify-internal-tasks'
|
||||||
PROCESS_FTP = 'process-ftp-tasks'
|
PROCESS_FTP = 'process-ftp-tasks'
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def old_queues():
|
||||||
|
return [
|
||||||
|
'db-sms',
|
||||||
|
'db-email',
|
||||||
|
'db-letter',
|
||||||
|
'priority',
|
||||||
|
'periodic',
|
||||||
|
'send-sms',
|
||||||
|
'send-email',
|
||||||
|
'research-mode',
|
||||||
|
'statistics',
|
||||||
|
'notify',
|
||||||
|
'retry',
|
||||||
|
'process-job'
|
||||||
|
]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def all_queues():
|
def all_queues():
|
||||||
return [
|
return [
|
||||||
@@ -240,6 +257,8 @@ class Development(Config):
|
|||||||
NOTIFICATION_QUEUE_PREFIX = 'development'
|
NOTIFICATION_QUEUE_PREFIX = 'development'
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
|
queues = QueueNames.all_queues() + QueueNames.old_queues()
|
||||||
|
|
||||||
for queue in QueueNames.all_queues():
|
for queue in QueueNames.all_queues():
|
||||||
Config.CELERY_QUEUES.append(
|
Config.CELERY_QUEUES.append(
|
||||||
Queue(queue, Exchange('default'), routing_key=queue)
|
Queue(queue, Exchange('default'), routing_key=queue)
|
||||||
@@ -259,7 +278,9 @@ class Test(Config):
|
|||||||
STATSD_HOST = "localhost"
|
STATSD_HOST = "localhost"
|
||||||
STATSD_PORT = 1000
|
STATSD_PORT = 1000
|
||||||
|
|
||||||
for queue in QueueNames.all_queues():
|
queues = QueueNames.all_queues() + QueueNames.old_queues()
|
||||||
|
|
||||||
|
for queue in queues:
|
||||||
Config.CELERY_QUEUES.append(
|
Config.CELERY_QUEUES.append(
|
||||||
Queue(queue, Exchange('default'), routing_key=queue)
|
Queue(queue, Exchange('default'), routing_key=queue)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user