fix: agent role based search

This commit is contained in:
Tejaswini Chile 2022-12-23 15:43:01 +05:30
parent 91205627b4
commit 08c75a5946
3 changed files with 17 additions and 16 deletions

View file

@ -1,5 +1,5 @@
class Conversations::AccountBasedSearchJob < ApplicationJob class Conversations::AccountBasedSearchJob < ApplicationJob
queue_as :default queue_as :async_database_migration
def perform(account_id) def perform(account_id)
Contact.rebuild_pg_search_documents(account_id) Contact.rebuild_pg_search_documents(account_id)

View file

@ -1,5 +1,5 @@
class Conversations::MultiSearchJob < ApplicationJob class Conversations::MultiSearchJob < ApplicationJob
queue_as :default queue_as :async_database_migration
def perform def perform
Account.all.each do |account| Account.all.each do |account|

View file

@ -12,20 +12,21 @@
# even put in dynamic logic, like a host-specific queue. # even put in dynamic logic, like a host-specific queue.
# http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/ # http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/
:queues: :queues:
- [low, 1] - [async_database_migration, 1]
- [scheduled_jobs, 1] - [low, 2]
- [webhooks, 1] - [scheduled_jobs, 2]
- [bots, 1] - [webhooks, 2]
- [active_storage_analysis, 1] - [bots, 2]
- [action_mailbox_incineration, 1] - [active_storage_analysis, 2]
- [active_storage_purge, 1] - [action_mailbox_incineration, 2]
- [integrations, 2] - [active_storage_purge, 2]
- [default, 2] - [integrations, 3]
- [mailers, 2] - [default, 3]
- [medium, 3] - [mailers, 3]
- [events, 3] - [medium, 4]
- [action_mailbox_routing, 3] - [events, 4]
- [high, 5] - [action_mailbox_routing, 4]
- [high, 6]
- [critical, 10] - [critical, 10]
# you can override concurrency based on environment # you can override concurrency based on environment