File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,9 @@ class Config:
139139 # URL of redis instance
140140 REDIS_URL = os .getenv ("REDIS_URL" )
141141 REDIS_ENABLED = False if os .environ .get ("REDIS_ENABLED" ) == "0" else True
142+
143+ ENABLE_SQS_MESSAGE_GROUP_IDS = os .environ .get ("ENABLE_SQS_MESSAGE_GROUP_IDS" , "1" ) == "1"
144+
142145 EXPIRE_CACHE_TEN_MINUTES = 600
143146 EXPIRE_CACHE_EIGHT_DAYS = 8 * 24 * 60 * 60
144147
@@ -587,6 +590,7 @@ class Development(Config):
587590 SERVER_NAME = os .getenv ("SERVER_NAME" )
588591
589592 REDIS_ENABLED = os .getenv ("REDIS_ENABLED" ) == "1"
593+ ENABLE_SQS_MESSAGE_GROUP_IDS = os .environ .get ("ENABLE_SQS_MESSAGE_GROUP_IDS" , "1" ) == "1"
590594
591595 S3_BUCKET_CSV_UPLOAD = "development-notifications-csv-upload"
592596 S3_BUCKET_CONTACT_LIST = "development-contact-list"
Original file line number Diff line number Diff line change 22import subprocess
33from collections import namedtuple
44from contextlib import contextmanager
5+ from unittest .mock import patch
56from urllib .parse import urlparse
67
78import freezegun
@@ -265,6 +266,12 @@ def set_config_values(app, dict):
265266 app .config [key ] = old_values [key ]
266267
267268
269+ @contextmanager
270+ def _with_message_group_id (task , value ):
271+ with patch ("notifications_utils.celery.NotifyTask.message_group_id" , new = value , create = True ):
272+ yield
273+
274+
268275class Matcher :
269276 def __init__ (self , description , key ):
270277 self .description = description
You can’t perform that action at this time.
0 commit comments