diff options
author | ThibG <thib@sitedethib.com> | 2020-12-23 14:33:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 14:33:47 +0100 |
commit | 225c934a1b66e2fcbedbda7936666c1ca3c9a04b (patch) | |
tree | d71a57d5f5b6bd864ec11cc1c914a6c3b30ba612 /config/initializers | |
parent | 81f4c550b2ed305f39f344d10289b38625f70bf7 (diff) | |
parent | 537afa00f35dbaa98cbff284683317b411104a82 (diff) |
Merge pull request #1481 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/chewy.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/initializers/chewy.rb b/config/initializers/chewy.rb index 8f54abf77..9fc9b2f1a 100644 --- a/config/initializers/chewy.rb +++ b/config/initializers/chewy.rb @@ -12,6 +12,10 @@ Chewy.settings = { sidekiq: { queue: 'pull' }, } +# We use our own async strategy even outside the request-response +# cycle, which takes care of checking if ElasticSearch is enabled +# or not. However, mind that for the Rails console, the :urgent +# strategy is set automatically with no way to override it. Chewy.root_strategy = :custom_sidekiq Chewy.request_strategy = :custom_sidekiq Chewy.use_after_commit_callbacks = false @@ -37,6 +41,7 @@ Elasticsearch::Transport::Client.prepend Module.new { super arguments end } + Elasticsearch::API::Indices::IndicesClient.prepend Module.new { def create(arguments = {}) arguments[:include_type_name] = true |