fix: Prevent WhatsApp campaign duplicate messages by updating status immediately (#12955)

Fixes
https://linear.app/chatwoot/issue/CW-5918/whatsapp-campaigns-running-in-parallel-and-duplicating-messages
This commit is contained in:
Muhsin Keloth 2025-11-26 15:25:49 +05:30 committed by GitHub
parent 7e0507e3b5
commit 6a83cad69d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,8 +3,9 @@ class Whatsapp::OneoffCampaignService
def perform
validate_campaign!
process_audience(extract_audience_labels)
# marks campaign completed so that other jobs won't pick it up
campaign.completed!
process_audience(extract_audience_labels)
end
private