mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
instructions for bulk testing and change delivery receipt delay to 2 minutes
This commit is contained in:
@@ -23,6 +23,10 @@ from app.models import (
|
||||
NOTIFICATION_TECHNICAL_FAILURE,
|
||||
)
|
||||
|
||||
# This is the amount of time to wait after sending an sms message before we check the aws logs and look for delivery
|
||||
# receipts
|
||||
DELIVERY_RECEIPT_DELAY_IN_SECONDS = 120
|
||||
|
||||
|
||||
@notify_celery.task(
|
||||
bind=True,
|
||||
@@ -96,7 +100,9 @@ def deliver_sms(self, notification_id):
|
||||
message_id = send_to_providers.send_sms_to_provider(notification)
|
||||
# We have to put it in UTC. For other timezones, the delay
|
||||
# will be ignored and it will fire immediately (although this probably only affects developer testing)
|
||||
my_eta = datetime.utcnow() + timedelta(seconds=300)
|
||||
my_eta = datetime.utcnow() + timedelta(
|
||||
seconds=DELIVERY_RECEIPT_DELAY_IN_SECONDS
|
||||
)
|
||||
check_sms_delivery_receipt.apply_async(
|
||||
[message_id, notification_id, now], eta=my_eta, queue=QueueNames.CHECK_SMS
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user