This massive set of changes uses the new queue names object throughout the app and tests.

Lots of changes, all changing the line of code that puts things into queues, and the code that tests that.
This commit is contained in:
Martyn Inglis
2017-05-25 10:51:49 +01:00
parent 21586c917c
commit 2591d3a1df
28 changed files with 128 additions and 123 deletions

View File

@@ -13,7 +13,7 @@ from app.celery.tasks import update_letter_notifications_statuses
from app.v2.errors import register_errors
from app.notifications.utils import autoconfirm_subscription
from app.schema_validation import validate
from app.config import QueueNames
letter_callback_blueprint = Blueprint('notifications_letter_callback', __name__)
register_errors(letter_callback_blueprint)
@@ -54,7 +54,7 @@ def process_letter_response():
filename = message['Records'][0]['s3']['object']['key']
current_app.logger.info('Received file from DVLA: {}'.format(filename))
current_app.logger.info('DVLA callback: Calling task to update letter notifications')
update_letter_notifications_statuses.apply_async([filename], queue='notify')
update_letter_notifications_statuses.apply_async([filename], queue=QueueNames.NOTIFY)
return jsonify(
result="success", message="DVLA callback succeeded"