mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Refactor high volume into serialised service model
Just looks a bit tidier and less repetitive. I’ve only done this for the serialised service because: - we’re only checking this in places where we’re already using the serialised service - if we want to check this elsewhere there’s a good chance that new code should be using the serialised service, since it’ll itself be doing some kind of performance optimisation
This commit is contained in:
@@ -211,7 +211,7 @@ def process_sms_or_email_notification(
|
||||
template_with_content=template_with_content
|
||||
)
|
||||
|
||||
if service.id in current_app.config.get('HIGH_VOLUME_SERVICE') \
|
||||
if service.high_volume \
|
||||
and api_user.key_type == KEY_TYPE_NORMAL \
|
||||
and notification_type in [EMAIL_TYPE, SMS_TYPE]:
|
||||
# Put service with high volumes of notifications onto a queue
|
||||
|
||||
Reference in New Issue
Block a user