change countdown from 30 to 60 seconds for message sends to better match batch insert timing

This commit is contained in:
Kenneth Kehl
2025-01-13 13:35:40 -08:00
parent eac21788a1
commit 4965bc2354
12 changed files with 29 additions and 29 deletions

View File

@@ -324,7 +324,7 @@ def batch_insert_notifications(self):
current_app.logger.exception("Notification batch insert failed")
for n in batch:
# Use 'created_at' as a TTL so we don't retry infinitely
if datetime.fromisoformat(n.created_at) < utc_now() - timedelta(minutes=1):
if datetime.fromisoformat(n.created_at) < utc_now() - timedelta(seconds=50):
current_app.logger.warning(
f"Abandoning stale data, could not write to db: {n.serialize_for_redis(n)}"
)

View File

@@ -256,7 +256,7 @@ def save_sms(self, service_id, notification_id, encrypted_notification, sender_i
)
)
provider_tasks.deliver_sms.apply_async(
[str(saved_notification.id)], queue=QueueNames.SEND_SMS, countdown=30
[str(saved_notification.id)], queue=QueueNames.SEND_SMS, countdown=60
)
current_app.logger.debug(

View File

@@ -174,7 +174,7 @@ def send_notification_to_queue_detached(
deliver_task = provider_tasks.deliver_email
try:
deliver_task.apply_async([str(notification_id)], queue=queue, countdown=30)
deliver_task.apply_async([str(notification_id)], queue=queue, countdown=60)
except Exception:
dao_delete_notifications_by_id(notification_id)
raise