chore: move UpdateMessageStatus to deferred queue (#11943)

-  move `UpdateMessageStatus` to `deferred` queue below `scheduled_jobs`

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Vishnu Narayanan
2025-07-16 08:19:00 +05:30
committed by GitHub
parent 61d10044a0
commit 6b8dd3c86a
3 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
class Conversations::UpdateMessageStatusJob < ApplicationJob class Conversations::UpdateMessageStatusJob < ApplicationJob
queue_as :low queue_as :deferred
# This job only support marking messages as read or delivered, update this array if we want to support more statuses # This job only support marking messages as read or delivered, update this array if we want to support more statuses
VALID_STATUSES = %w[read delivered].freeze VALID_STATUSES = %w[read delivered].freeze

View File

@@ -23,6 +23,7 @@
- action_mailbox_routing - action_mailbox_routing
- low - low
- scheduled_jobs - scheduled_jobs
- deferred
- housekeeping - housekeeping
- async_database_migration - async_database_migration
- active_storage_analysis - active_storage_analysis

View File

@@ -10,7 +10,7 @@ RSpec.describe Conversations::UpdateMessageStatusJob do
it 'enqueues the job' do it 'enqueues the job' do
expect { job }.to have_enqueued_job(described_class) expect { job }.to have_enqueued_job(described_class)
.with(conversation.id, conversation.contact_last_seen_at, :read) .with(conversation.id, conversation.contact_last_seen_at, :read)
.on_queue('low') .on_queue('deferred')
end end
context 'when called' do context 'when called' do