mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 10:38:07 +01:00
Fix sidekiq jobs not triggering Elasticsearch index updates (#24046)
This commit is contained in:
parent
1ed12d5e2f
commit
f432db7b9f
3 changed files with 5 additions and 4 deletions
|
@ -5,7 +5,9 @@ require_relative '../config/boot'
|
||||||
require_relative '../lib/cli'
|
require_relative '../lib/cli'
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mastodon::CLI.start(ARGV)
|
Chewy.strategy(:mastodon) do
|
||||||
|
Mastodon::CLI.start(ARGV)
|
||||||
|
end
|
||||||
rescue Interrupt
|
rescue Interrupt
|
||||||
exit(130)
|
exit(130)
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,7 +19,6 @@ Chewy.settings = {
|
||||||
# cycle, which takes care of checking if Elasticsearch is enabled
|
# cycle, which takes care of checking if Elasticsearch is enabled
|
||||||
# or not. However, mind that for the Rails console, the :urgent
|
# or not. However, mind that for the Rails console, the :urgent
|
||||||
# strategy is set automatically with no way to override it.
|
# strategy is set automatically with no way to override it.
|
||||||
Chewy.root_strategy = :mastodon
|
|
||||||
Chewy.request_strategy = :mastodon
|
Chewy.request_strategy = :mastodon
|
||||||
Chewy.use_after_commit_callbacks = false
|
Chewy.use_after_commit_callbacks = false
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
class Mastodon::SidekiqMiddleware
|
class Mastodon::SidekiqMiddleware
|
||||||
BACKTRACE_LIMIT = 3
|
BACKTRACE_LIMIT = 3
|
||||||
|
|
||||||
def call(*)
|
def call(*, &block)
|
||||||
yield
|
Chewy.strategy(:mastodon, &block)
|
||||||
rescue Mastodon::HostValidationError
|
rescue Mastodon::HostValidationError
|
||||||
# Do not retry
|
# Do not retry
|
||||||
rescue => e
|
rescue => e
|
||||||
|
|
Loading…
Reference in a new issue