mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 01:32:20 -05:00
remove jobs from letter api calls
we now no longer create a job. At the end of the post there is no action, as we don't have any tasks to queue immediately - if it's a real notification it'll get picked up in the evening scheduled task. If it's a test notification, we create it with an initial status of sending so that we can be sure it'll never get picked up - and then we trigger the update-letter-notifications-to-sent-to-dvla task to sent the sent-at/by.
This commit is contained in:
@@ -335,17 +335,17 @@ def run_letter_notifications():
|
||||
if notifications:
|
||||
file_contents = create_dvla_file_contents_for_notifications(notifications)
|
||||
|
||||
file_location = '{}-dvla-notifications.txt'.format(current_time)
|
||||
filename = '{}-dvla-notifications.txt'.format(current_time)
|
||||
s3upload(
|
||||
filedata=file_contents + '\n',
|
||||
region=current_app.config['AWS_REGION'],
|
||||
bucket_name=current_app.config['DVLA_BUCKETS']['notification'],
|
||||
file_location=file_location
|
||||
file_location=filename
|
||||
)
|
||||
|
||||
notify_celery.send_task(
|
||||
name=TaskNames.DVLA_NOTIFICATIONS,
|
||||
kwargs={'filename': file_location},
|
||||
kwargs={'filename': filename},
|
||||
queue=QueueNames.PROCESS_FTP
|
||||
)
|
||||
current_app.logger.info(
|
||||
|
||||
Reference in New Issue
Block a user