mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05:00
Revert "Celery 4"
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user