mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Update callback handling to process DVLA response files
- handle `RS.TXT` and `RSP.TXT` files
This commit is contained in:
@@ -54,7 +54,8 @@ def process_letter_response():
|
||||
filename = message['Records'][0]['s3']['object']['key']
|
||||
current_app.logger.info('Received file from DVLA: {}'.format(filename))
|
||||
|
||||
if 'rs.txt' in filename.lower():
|
||||
if filename.lower().endswith('rs.txt') or filename.lower().endswith('rsp.txt'):
|
||||
current_app.logger.info('DVLA callback: Calling task to update letter notifications')
|
||||
update_letter_notifications_statuses.apply_async([filename], queue=QueueNames.NOTIFY)
|
||||
|
||||
return jsonify(
|
||||
|
||||
Reference in New Issue
Block a user