instructions for bulk testing and change delivery receipt delay to 2 minutes

This commit is contained in:
Kenneth Kehl
2023-09-28 14:27:16 -07:00
parent a6c563c239
commit bebce829af
3 changed files with 37 additions and 1 deletions

View File

@@ -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
)