chatwoot/spec/jobs
Sojan Jose f27bbef73b
feat: show processing status for one-off campaigns (#14592)
## Summary

One-off SMS and WhatsApp campaigns now show a `Processing` state while
the audience send is in progress. The campaign moves to `Completed`
after processing finishes, and already-processing campaigns are skipped
by the scheduler to avoid duplicate sends.

## Closes

- [CW-6037: feat: Introduce an in-progress status for
campaigns](https://linear.app/chatwoot/issue/CW-6037/feat-introduce-an-in-progress-status-for-campaigns)

## Screenshot

SMS campaign card showing the new `Processing` status.

<img width="3840" height="2160" alt="framed-campaign-processing-status"
src="https://github.com/user-attachments/assets/de7913b5-65fb-4121-9034-24a568eb0382"
/>

## What changed

- Added `processing` as a campaign status.
- Mark one-off campaigns as `processing` under a row lock before the
send service runs.
- Complete SMS, Twilio SMS, and WhatsApp one-off campaigns after
audience processing finishes.
- Keep campaigns in `processing` if an unexpected service error escapes,
so the scheduler does not automatically resend the audience.
- Added the `Processing` label for SMS and WhatsApp campaign cards.

## Known operational behavior

If a worker is interrupted or an unexpected service error escapes after
a campaign is marked `processing`, the campaign can remain in
`processing`. This is intentional for now to avoid automatic
full-audience resends. Installation admins can decide whether to mark
the campaign completed or restart it manually from the Rails console
after checking what was sent.

## How to test

- Create a one-off SMS or WhatsApp campaign scheduled for now.
- Run the scheduled job or trigger the campaign job.
- Confirm the campaign card shows `Processing` while the audience is
being processed. For small audiences, refresh during processing or use a
larger audience so the state is observable.
- Confirm the campaign moves to `Completed` after audience processing
finishes.
- Confirm an already-processing campaign is not enqueued again by the
scheduled job.
2026-06-01 16:47:17 +05:30
..
account feat: Add labels to contact import/export (#13313) 2026-05-06 18:46:36 +05:30
agent_bots fix: [CW-6940] Fix SSRF issue for webhook trigger used by macros and automations (#14155) 2026-04-27 20:30:59 +05:30
agents chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
auto_assignment fix: atomically claim conversation to prevent duplicate assignment (#14495) 2026-05-21 16:14:28 +05:30
avatar fix: [CW-6931] Harden external downloads against SSRF [avatar from url job] (#14153) 2026-04-24 18:59:45 +05:30
campaigns chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
channels feat: Added the backend support for twilio content templates (#12272) 2025-08-24 10:05:15 +05:30
contacts feat: Bulk actions for contacts (#12763) 2025-10-30 15:28:28 +05:30
conversations fix: prevent NoMethodError in mute helpers when contact is nil (#13277) 2026-01-15 22:00:09 -08:00
crm feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
inboxes feat: add timeout for imap email job and skip problematic emails (#11981) 2026-05-25 15:16:52 +05:30
internal feat: distributed scheduling for version check job (#13042) 2026-03-17 02:27:49 -07:00
labels feat(labels): remove label associations asynchronously on delete (#13531) 2026-05-08 13:40:36 +05:30
migration fix: validate OpenAI hook credentials (#14068) 2026-05-18 14:08:57 +05:30
notification fix: incorrect scope across controllers (#14459) 2026-05-14 20:34:18 +05:30
webhooks feat: Store WhatsApp BSUID identifiers from inbound webhooks (#14436) 2026-05-20 13:36:43 +04:00
bulk_actions_job_spec.rb fix: incorrect scope across controllers (#14459) 2026-05-14 20:34:18 +05:30
conversation_reply_email_job_spec.rb chore(sidekiq): log ActiveJob class and job_id on dequeue (#12704) 2025-10-22 20:20:37 -07:00
data_import_job_spec.rb feat: Add labels to contact import/export (#13313) 2026-05-06 18:46:36 +05:30
delete_object_job_spec.rb feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
event_dispatcher_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
hook_job_spec.rb feat(linear): Auto link Linear issues from private notes (#14405) 2026-05-12 13:03:40 +04:00
mutex_application_job_spec.rb feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
send_on_slack_job_spec.rb fix: issue with slack job (#7179) 2023-05-24 20:22:34 +05:30
send_reply_job_spec.rb fix: resolve SendReplyJob flaky specs (#14394) 2026-05-07 22:47:09 +05:30
slack_unfurl_job_spec.rb feat: Support link unfurling for all the channels within the same connected channel account. (#8033) 2023-10-08 17:55:03 +05:30
trigger_scheduled_items_job_spec.rb feat: show processing status for one-off campaigns (#14592) 2026-06-01 16:47:17 +05:30
update_slack_message_job_spec.rb fix(slack): Sync bot interactive responses (#14076) 2026-04-28 10:29:03 +04:00
webhook_job_spec.rb feat: add per-webhook secret with backfill migration (#13573) 2026-02-26 17:26:12 +05:30