Skip to content
Snippets Groups Projects
Unverified Commit f432db7b authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix sidekiq jobs not triggering Elasticsearch index updates (#24046)

parent 1ed12d5e
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,9 @@ require_relative '../config/boot'
require_relative '../lib/cli'
begin
Mastodon::CLI.start(ARGV)
Chewy.strategy(:mastodon) do
Mastodon::CLI.start(ARGV)
end
rescue Interrupt
exit(130)
end
......@@ -19,7 +19,6 @@ Chewy.settings = {
# 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 = :mastodon
Chewy.request_strategy = :mastodon
Chewy.use_after_commit_callbacks = false
......
......@@ -3,8 +3,8 @@
class Mastodon::SidekiqMiddleware
BACKTRACE_LIMIT = 3
def call(*)
yield
def call(*, &block)
Chewy.strategy(:mastodon, &block)
rescue Mastodon::HostValidationError
# Do not retry
rescue => e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment