iachat/spec/jobs
Sojan Jose 55315089cf
fix(delete_object_job): pre-purge heavy associations before destroy to prevent timeout (#12408)
Deleting large Accounts/Inboxes with object.destroy! can time out and
create heavy destroy_async fan-out; this change adds a simple pre-purge
that batch-destroys heavy associations first .

```
Account: conversations, contacts
Inbox: conversations, contact_inboxes
```

We use find_in_batches(5000), then proceeds with destroy!, reducing DB
pressure and race conditions while preserving callbacks and leaving the
behavior for non heavy models unchanged. The change is also done in a
way to easily add additional objects or relations to the list.


fixes:
https://linear.app/chatwoot/issue/CW-3106/inbox-deletion-process-update-the-flow
2025-09-11 18:43:36 +05:30
..
account feat: Add support for minutes in auto resolve feature (#11269) 2025-05-07 00:36:15 -07:00
agent_bots
agents
avatar fix: Add URL validation and rate limiting for contact avatar sync (#11979) 2025-09-10 20:08:06 +05:30
campaigns
channels feat: Added the backend support for twilio content templates (#12272) 2025-08-24 10:05:15 +05:30
conversations chore: move UpdateMessageStatus to deferred queue (#11943) 2025-07-16 08:19:00 +05:30
crm
inboxes feat: Run assignment every 15 minutes (#12334) 2025-08-29 15:10:56 -07:00
internal feat: automate account deletion (#11406) 2025-05-23 12:58:13 +05:30
labels
migration
notification
webhooks fix: Flaky Instagram webhook specs (#12170) 2025-08-12 20:12:18 +05:30
bulk_actions_job_spec.rb
data_import_job_spec.rb
delete_object_job_spec.rb fix(delete_object_job): pre-purge heavy associations before destroy to prevent timeout (#12408) 2025-09-11 18:43:36 +05:30
event_dispatcher_job_spec.rb
hook_job_spec.rb
mutex_application_job_spec.rb
send_on_slack_job_spec.rb
send_reply_job_spec.rb
slack_unfurl_job_spec.rb
trigger_scheduled_items_job_spec.rb
webhook_job_spec.rb