mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
New queues for the sms/email tasks
Previously there were 4 queues for sending messages The was based on the fact that each notification has 2 actions - persist in the database and send to provider. Two queues supported the CSV upload - for the first of these tasks - bulk-email - build-sms And there were two more queues for the tasks that make the 3rd party client calls. - sms - email API Calls just used the latter two queues for both tasks Added four new queues - db-email - db-sms - send-sms - send-email So an API call puts a notification into the db-[type] queue first, which then puts the notification into the send-[type] queue Build queues stay as before. This will allow us to target processing of these tasks with separate workers to manage these differently.
This commit is contained in:
@@ -299,7 +299,7 @@ def send_notification(notification_type):
|
||||
'api_key_id': str(api_user.id),
|
||||
'key_type': api_user.key_type
|
||||
},
|
||||
queue='sms'
|
||||
queue='db-sms'
|
||||
)
|
||||
else:
|
||||
send_email.apply_async(
|
||||
@@ -313,7 +313,7 @@ def send_notification(notification_type):
|
||||
'api_key_id': str(api_user.id),
|
||||
'key_type': api_user.key_type
|
||||
},
|
||||
queue='email'
|
||||
queue='db-email'
|
||||
)
|
||||
|
||||
return jsonify(
|
||||
|
||||
Reference in New Issue
Block a user