mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-01 20:28:44 -04:00
only retry if the broadcast message task is in sending
previously we would retry if the task was queued up for retry but the status is in "received-ack" or "received-err". We don't expect that a task will be retried after getting this status, but if there are duplicate tasks that could happen. Lets plan for the worst by saying "only process a retry if the task is currently in sending". this way, if a duplicate task is on retry and the first task goes through succesfully, the duplicate task will give up.
This commit is contained in:
@@ -381,7 +381,7 @@ def setup_sqlalchemy_events(app):
|
||||
'host': current_app.config['NOTIFY_APP_NAME'], # worker name
|
||||
'url_rule': current_task.name, # task name
|
||||
}
|
||||
# anything else. migrations possibly.
|
||||
# anything else. migrations possibly, or flask cli commands.
|
||||
else:
|
||||
current_app.logger.warning('Checked out sqlalchemy connection from outside of request/task')
|
||||
connection_record.info['request_data'] = {
|
||||
|
||||
Reference in New Issue
Block a user