iachat/spec
Pranav 661e905dbd
fix: Skip HookJob for inactive or irrelevant hooks (#12093)
On Aug 2, we had a P0 because of a sudden spike in Sidekiq jobs. The
queue went up to 100k jobs and workers scaled from 400 threads to 1000+.
Most of the jobs were HookJobs, and a large chunk of them were for
Linear but they weren’t doing anything useful.

Turns out, whenever there’s an update on a contact or conversation, we
were triggering all account-level hooks without checking if the event
was relevant. So if someone did a bulk import or ran an update, it would
enqueue a huge number of unnecessary jobs.

This PR adds two checks before enqueuing:
- Whether the hook is active
- Whether the event is relevant for that hook
2025-08-04 19:08:45 -07:00
..
actions fix: Disable enqueueing Avatar jobs if the URL is invalid (#12035) 2025-07-24 12:56:39 +04:00
assets feat: Move email attachments from links to file attachments (#11304) 2025-04-15 23:43:12 -07:00
builders fix: missing metrics and labels from label summary (#11718) 2025-06-12 17:58:56 +05:30
channels fix: Move contact events to account stream rather than individual user stream (#11082) 2025-03-13 17:46:48 -07:00
config feat: move embedding config to a yaml file (#11611) 2025-05-30 16:26:40 +05:30
configs chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
controllers feat(cloud): Add support for viewing status of SSL in custom domains (#12011) 2025-07-30 10:52:47 -07:00
dispatchers Non blocking event dispatch (#652) 2020-03-29 19:18:30 +05:30
drops feat: Add the support for custom attributes in message variables (#8511) 2023-12-08 14:13:35 -08:00
enterprise fix: Disable IMAP inboxes that requires authorization (#12092) 2025-08-01 16:32:29 -07:00
factories feat: WhatsApp campaigns (#11910) 2025-07-16 09:04:02 +05:30
finders fix: Apply filter for inbox when the user is an admin (#11197) 2025-03-27 17:05:48 -07:00
fixtures chore: Add a condition to handle bounced email (#11873) 2025-08-01 14:43:46 +05:30
helpers feat: OG Image in Chatwoot Help Center (#11826) 2025-07-03 12:41:12 -07:00
integration Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
jobs fix: Disable IMAP inboxes that requires authorization (#12092) 2025-08-01 16:32:29 -07:00
lib feat: use captain endpoint config in legacy OpenAI base service (#12060) 2025-07-30 08:58:27 +04:00
listeners fix: Skip HookJob for inactive or irrelevant hooks (#12093) 2025-08-04 19:08:45 -07:00
mailboxes chore: Add a condition to handle bounced email (#11873) 2025-08-01 14:43:46 +05:30
mailers feat(cloud): Add support for viewing status of SSL in custom domains (#12011) 2025-07-30 10:52:47 -07:00
models feat: Remove subscription on WhatsApp inbox delete (#11977) 2025-07-24 14:04:19 +04:00
policies feat: Add conversation delete feature (#11677) 2025-06-05 15:53:17 -05:00
presenters feat: add references header to reply emails (#11719) 2025-07-29 15:54:14 +05:30
requests/api/v1 feat: Update the slack integration-flow to allow users to select the channel (#7637) 2023-07-28 14:50:30 -07:00
services fix: Populate meta field for whatsApp shared contacts (#12097) 2025-08-04 14:50:45 -07:00
support feat: Slack link unfurling (#7940) 2023-09-29 19:35:56 +05:30
workers fix: Capture delivery errors to avoid false positives (#8790) 2024-01-26 14:22:18 +04:00
rails_helper.rb feat: locking and retry in FB message parsing (#7701) 2023-08-23 09:48:17 +07:00
spec_helper.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
test_helper.rb Chore: Setup test coverage in codeclimate [#332] (#333) 2019-12-02 08:57:11 +05:30