Revert "Celery 4"

This commit is contained in:
Leo Hemsted
2018-10-09 13:27:49 +01:00
committed by GitHub
parent 72358899ad
commit 2ed50e760f
7 changed files with 42 additions and 42 deletions

View File

@@ -150,9 +150,9 @@ class Config(object):
BROKER_URL = 'sqs://'
BROKER_TRANSPORT_OPTIONS = {
'region': AWS_REGION,
'polling_interval': 1, # 1 second
'visibility_timeout': 310,
'queue_name_prefix': NOTIFICATION_QUEUE_PREFIX,
'wait_time_seconds': 20 # enable long polling, with a wait time of 20 seconds
'queue_name_prefix': NOTIFICATION_QUEUE_PREFIX
}
CELERY_ENABLE_UTC = True
CELERY_TIMEZONE = 'Europe/London'
@@ -270,9 +270,7 @@ class Config(object):
'options': {'queue': QueueNames.PERIODIC}
}
}
# 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()]
CELERY_QUEUES = []
NOTIFICATIONS_ALERT = 5 # five mins
FROM_NUMBER = 'development'
@@ -360,6 +358,11 @@ class Development(Config):
STATSD_PORT = 1000
STATSD_PREFIX = "stats-prefix"
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
@@ -382,6 +385,11 @@ class Test(Development):
BROKER_URL = 'you-forgot-to-mock-celery-in-your-tests://'
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"

View File

@@ -5,7 +5,7 @@ from datetime import (
timedelta,
)
from botocore.exceptions import ClientError as BotoClientError
from boto.exception import BotoClientError
from flask import current_app
from notifications_utils.recipients import (