fix(campaign): roll back rejected immediate queues

This commit is contained in:
2026-07-22 20:30:00 +02:00
parent 689dc1fd6b
commit 4774a8025c
3 changed files with 63 additions and 2 deletions

View File

@@ -3608,6 +3608,10 @@ def send_campaign_now_endpoint(
)
return SendCampaignNowResponse(result=response_result)
except SynchronousSendRejected as exc:
# A synchronous request stages queue state before the all-message
# preflight can run. Rejecting that preflight must not leave work
# eligible for a background worker when no provider effect occurred.
session.rollback()
audit_from_principal(
session,
principal,