mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Creating notification tasks should write send tasks to the research-mode queue if research mode service.
This commit is contained in:
@@ -131,7 +131,10 @@ def send_sms(self,
|
||||
created_at, notification, notification_id, service.id, SMS_TYPE, api_key_id, key_type
|
||||
)
|
||||
)
|
||||
provider_tasks.deliver_sms.apply_async((notification_id), queue='send-sms')
|
||||
provider_tasks.deliver_sms.apply_async(
|
||||
(notification_id),
|
||||
queue='send-sms' if not service.research_mode else 'research-mode'
|
||||
)
|
||||
|
||||
current_app.logger.info(
|
||||
"SMS {} created at {}".format(notification_id, created_at)
|
||||
@@ -170,7 +173,10 @@ def send_email(self, service_id,
|
||||
)
|
||||
)
|
||||
|
||||
provider_tasks.deliver_email.apply_async((notification_id), queue='send-email')
|
||||
provider_tasks.deliver_email.apply_async(
|
||||
(notification_id),
|
||||
queue='send-email' if not service.research_mode else 'research-mode'
|
||||
)
|
||||
|
||||
current_app.logger.info("Email {} created at {}".format(notification_id, created_at))
|
||||
except SQLAlchemyError as e:
|
||||
|
||||
Reference in New Issue
Block a user