about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-10-01 01:19:11 +0200
committerGitHub <noreply@github.com>2019-10-01 01:19:11 +0200
commit5c42f47617d311219d06e082e4daa41e671903c8 (patch)
treec2be1daba626b6bbfd833cf9a55c5dc243e786d6 /config/initializers
parent12c4ec0c83fc5d43a29b3333ab07510c87844166 (diff)
Fix records not being indexed sometimes (#12024)
It's possible that after commit callbacks were not firing when
exceptions occurred in the process. Also, the default Sidekiq
strategy does not push indexing jobs immediately, which is not
necessary and could be part of the issue too.
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/chewy.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/initializers/chewy.rb b/config/initializers/chewy.rb
index d5347f2bf..9ff0dccc1 100644
--- a/config/initializers/chewy.rb
+++ b/config/initializers/chewy.rb
@@ -12,8 +12,9 @@ Chewy.settings = {
   sidekiq: { queue: 'pull' },
 }
 
-Chewy.root_strategy    = enabled ? :sidekiq : :bypass
-Chewy.request_strategy = enabled ? :sidekiq : :bypass
+Chewy.root_strategy              = :custom_sidekiq
+Chewy.request_strategy           = :custom_sidekiq
+Chewy.use_after_commit_callbacks = false
 
 module Chewy
   class << self