mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Merge branch 'master' into fix-count
This commit is contained in:
@@ -24,7 +24,7 @@ from notifications_utils.template import (
|
||||
Template
|
||||
)
|
||||
|
||||
from app.models import SMS_TYPE, EMAIL_TYPE
|
||||
from app.models import SMS_TYPE, EMAIL_TYPE, KEY_TYPE_TEST
|
||||
|
||||
|
||||
def retry_iteration_to_delay(retry=0):
|
||||
@@ -65,7 +65,7 @@ def send_sms_to_provider(self, service_id, notification_id):
|
||||
prefix=service.name
|
||||
)
|
||||
try:
|
||||
if service.research_mode:
|
||||
if service.research_mode or notification.key_type == KEY_TYPE_TEST:
|
||||
send_sms_response.apply_async(
|
||||
(provider.get_name(), str(notification_id), notification.to), queue='research-mode'
|
||||
)
|
||||
@@ -134,7 +134,7 @@ def send_email_to_provider(self, service_id, notification_id):
|
||||
values=notification.personalisation
|
||||
)
|
||||
|
||||
if service.research_mode:
|
||||
if service.research_mode or notification.key_type == KEY_TYPE_TEST:
|
||||
reference = str(create_uuid())
|
||||
send_email_response.apply_async(
|
||||
(provider.get_name(), reference, notification.to), queue='research-mode'
|
||||
|
||||
@@ -142,6 +142,7 @@ class ApiKey(db.Model, Versioned):
|
||||
|
||||
KEY_TYPE_NORMAL = 'normal'
|
||||
KEY_TYPE_TEAM = 'team'
|
||||
KEY_TYPE_TEST = 'test'
|
||||
|
||||
|
||||
class KeyTypes(db.Model):
|
||||
|
||||
Reference in New Issue
Block a user