From 08c75a5946337200dea64f3584d19e3c883f7c71 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Fri, 23 Dec 2022 15:43:01 +0530 Subject: [PATCH] fix: agent role based search --- .../conversations/account_based_search_job.rb | 2 +- app/jobs/conversations/multi_search_job.rb | 2 +- config/sidekiq.yml | 29 ++++++++++--------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/jobs/conversations/account_based_search_job.rb b/app/jobs/conversations/account_based_search_job.rb index 86061697e..bd6725138 100644 --- a/app/jobs/conversations/account_based_search_job.rb +++ b/app/jobs/conversations/account_based_search_job.rb @@ -1,5 +1,5 @@ class Conversations::AccountBasedSearchJob < ApplicationJob - queue_as :default + queue_as :async_database_migration def perform(account_id) Contact.rebuild_pg_search_documents(account_id) diff --git a/app/jobs/conversations/multi_search_job.rb b/app/jobs/conversations/multi_search_job.rb index c25012038..273f577e4 100644 --- a/app/jobs/conversations/multi_search_job.rb +++ b/app/jobs/conversations/multi_search_job.rb @@ -1,5 +1,5 @@ class Conversations::MultiSearchJob < ApplicationJob - queue_as :default + queue_as :async_database_migration def perform Account.all.each do |account| diff --git a/config/sidekiq.yml b/config/sidekiq.yml index e83ddf8f0..f80a56727 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -12,20 +12,21 @@ # even put in dynamic logic, like a host-specific queue. # http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/ :queues: - - [low, 1] - - [scheduled_jobs, 1] - - [webhooks, 1] - - [bots, 1] - - [active_storage_analysis, 1] - - [action_mailbox_incineration, 1] - - [active_storage_purge, 1] - - [integrations, 2] - - [default, 2] - - [mailers, 2] - - [medium, 3] - - [events, 3] - - [action_mailbox_routing, 3] - - [high, 5] + - [async_database_migration, 1] + - [low, 2] + - [scheduled_jobs, 2] + - [webhooks, 2] + - [bots, 2] + - [active_storage_analysis, 2] + - [action_mailbox_incineration, 2] + - [active_storage_purge, 2] + - [integrations, 3] + - [default, 3] + - [mailers, 3] + - [medium, 4] + - [events, 4] + - [action_mailbox_routing, 4] + - [high, 6] - [critical, 10] # you can override concurrency based on environment