Skip to content

Commit

Permalink
Add check preventing Sidekiq workers from running with Makara configu…
Browse files Browse the repository at this point in the history
…red (#25850)

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
  • Loading branch information
ClearlyClaire and Gargron committed Jul 21, 2023
1 parent fc4a93b commit c46aa23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
require_relative '../../lib/mastodon/sidekiq_middleware'

Sidekiq.configure_server do |config|
if Rails.configuration.database_configuration.dig('production', 'adapter') == 'postgresql_makara'
STDERR.puts 'ERROR: Database replication is not currently supported in Sidekiq workers. Check your configuration.'
exit 1
end

config.redis = REDIS_SIDEKIQ_PARAMS

config.server_middleware do |chain|
Expand Down

0 comments on commit c46aa23

Please sign in to comment.