All queues now managed in the same way:

- TEST and DEV builds set up their own queue lists for reading
- PROD/STAGE/PREVIEW use the separate worker process with the -Q flag

This enables us to rename queues in due course
This commit is contained in:
Martyn Inglis
2017-05-24 15:47:20 +01:00
parent 8a2715e3e1
commit 07b527bb1b
2 changed files with 10 additions and 8 deletions

View File

@@ -160,11 +160,7 @@ class Config(object):
'options': {'queue': 'periodic'}
}
}
CELERY_QUEUES = [
Queue('process-job', Exchange('default'), routing_key='process-job'),
Queue('retry', Exchange('default'), routing_key='retry'),
Queue('notify', Exchange('default'), routing_key='notify')
]
CELERY_QUEUES = []
NOTIFICATIONS_ALERT = 5 # five mins
FROM_NUMBER = 'development'
@@ -224,7 +220,10 @@ class Development(Config):
Queue('send-sms', Exchange('default'), routing_key='send-sms'),
Queue('send-email', Exchange('default'), routing_key='send-email'),
Queue('research-mode', Exchange('default'), routing_key='research-mode'),
Queue('statistics', Exchange('default'), routing_key='statistics')
Queue('statistics', Exchange('default'), routing_key='statistics'),
Queue('process-job', Exchange('default'), routing_key='process-job'),
Queue('retry', Exchange('default'), routing_key='retry'),
Queue('notify', Exchange('default'), routing_key='notify')
]
API_HOST_NAME = "http://localhost:6011"
API_RATE_LIMIT_ENABLED = True
@@ -248,7 +247,10 @@ class Test(Config):
Queue('send-sms', Exchange('default'), routing_key='send-sms'),
Queue('send-email', Exchange('default'), routing_key='send-email'),
Queue('research-mode', Exchange('default'), routing_key='research-mode'),
Queue('statistics', Exchange('default'), routing_key='statistics')
Queue('statistics', Exchange('default'), routing_key='statistics'),
Queue('process-job', Exchange('default'), routing_key='process-job'),
Queue('retry', Exchange('default'), routing_key='retry'),
Queue('notify', Exchange('default'), routing_key='notify')
]
API_RATE_LIMIT_ENABLED = True

View File

@@ -50,6 +50,6 @@ applications:
NOTIFY_APP_NAME: delivery-worker-priority
- name: notify-delivery-worker
command: scripts/run_app_paas.sh celery -A aws_run_celery.notify_celery worker --loglevel=INFO --concurrency=11
command: scripts/run_app_paas.sh celery -A aws_run_celery.notify_celery worker --loglevel=INFO --concurrency=11 -Q process-job,notify,retry
env:
NOTIFY_APP_NAME: delivery-worker