chore: Reorganize Sidekiq Queues (#6976)
- Rearrange and reprioritize current sidekiq queues - Trim the unnecessary queues ref: https://linear.app/chatwoot/issue/CW-1480/chore-run-all-sidekiq-jobs-async
This commit is contained in:
@@ -11,7 +11,7 @@ RSpec.describe AgentBots::WebhookJob, type: :job do
|
||||
it 'queues the job' do
|
||||
expect { job }.to have_enqueued_job(described_class)
|
||||
.with(url, payload)
|
||||
.on_queue('bots')
|
||||
.on_queue('high')
|
||||
end
|
||||
|
||||
it 'executes perform' do
|
||||
|
||||
@@ -17,7 +17,7 @@ RSpec.describe Agents::DestroyJob, type: :job do
|
||||
it 'enqueues the job' do
|
||||
expect { job }.to have_enqueued_job(described_class)
|
||||
.with(account, user)
|
||||
.on_queue('default')
|
||||
.on_queue('low')
|
||||
end
|
||||
|
||||
describe '#perform' do
|
||||
|
||||
@@ -6,7 +6,7 @@ RSpec.describe Avatar::AvatarFromUrlJob, type: :job do
|
||||
|
||||
it 'enqueues the job' do
|
||||
expect { described_class.perform_later(avatarable, avatar_url) }.to have_enqueued_job(described_class)
|
||||
.on_queue('default')
|
||||
.on_queue('low')
|
||||
end
|
||||
|
||||
it 'will attach avatar from url' do
|
||||
|
||||
@@ -8,7 +8,7 @@ RSpec.describe DeleteObjectJob, type: :job do
|
||||
it 'enqueues the job' do
|
||||
expect { job }.to have_enqueued_job(described_class)
|
||||
.with(account)
|
||||
.on_queue('default')
|
||||
.on_queue('low')
|
||||
end
|
||||
|
||||
context 'when an object is passed to the job' do
|
||||
|
||||
@@ -11,7 +11,7 @@ RSpec.describe EventDispatcherJob, type: :job do
|
||||
it 'queues the job' do
|
||||
expect { job }.to have_enqueued_job(described_class)
|
||||
.with(event_name, timestamp, event_data)
|
||||
.on_queue('events')
|
||||
.on_queue('critical')
|
||||
end
|
||||
|
||||
it 'publishes event' do
|
||||
|
||||
@@ -12,7 +12,7 @@ RSpec.describe HookJob, type: :job do
|
||||
it 'enqueues the job' do
|
||||
expect { job }.to have_enqueued_job(described_class)
|
||||
.with(hook, event_name, event_data)
|
||||
.on_queue('integrations')
|
||||
.on_queue('medium')
|
||||
end
|
||||
|
||||
context 'when handleable events like message.created' do
|
||||
|
||||
@@ -10,7 +10,7 @@ RSpec.describe Inboxes::FetchImapEmailInboxesJob, type: :job do
|
||||
|
||||
it 'enqueues the job' do
|
||||
expect { described_class.perform_later }.to have_enqueued_job(described_class)
|
||||
.on_queue('low')
|
||||
.on_queue('scheduled_jobs')
|
||||
end
|
||||
|
||||
context 'when called' do
|
||||
|
||||
@@ -19,7 +19,7 @@ RSpec.describe Inboxes::FetchImapEmailsJob, type: :job do
|
||||
|
||||
it 'enqueues the job' do
|
||||
expect { described_class.perform_later }.to have_enqueued_job(described_class)
|
||||
.on_queue('low')
|
||||
.on_queue('scheduled_jobs')
|
||||
end
|
||||
|
||||
context 'when imap fetch new emails' do
|
||||
|
||||
@@ -11,7 +11,7 @@ RSpec.describe WebhookJob, type: :job do
|
||||
it 'queues the job' do
|
||||
expect { job }.to have_enqueued_job(described_class)
|
||||
.with(url, payload)
|
||||
.on_queue('webhooks')
|
||||
.on_queue('medium')
|
||||
end
|
||||
|
||||
it 'executes perform' do
|
||||
|
||||
Reference in New Issue
Block a user