Added a new sns callback for testing old dvla response file type.

Merge branch 'raise-alert-when-no-ack-file' of https://github.com/alphagov/notifications-api into raise-alert-when-no-ack-file
This commit is contained in:
venusbb
2018-01-12 16:10:09 +00:00
2 changed files with 20 additions and 4 deletions

View File

@@ -53,8 +53,9 @@ def process_letter_response():
message = json.loads(req_json['Message'])
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=QueueNames.NOTIFY)
if 'rs.txt' in filename.lower():
update_letter_notifications_statuses.apply_async([filename], queue=QueueNames.NOTIFY)
return jsonify(
result="success", message="DVLA callback succeeded"