Skip to content

Commit 69c8f26

Browse files
Add check preventing Sidekiq workers from running with Makara configured (#25850)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
1 parent 3f5af76 commit 69c8f26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/initializers/sidekiq.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
require_relative '../../lib/mastodon/sidekiq_middleware'
44

55
Sidekiq.configure_server do |config|
6+
if Rails.configuration.database_configuration.dig('production', 'adapter') == 'postgresql_makara'
7+
STDERR.puts 'ERROR: Database replication is not currently supported in Sidekiq workers. Check your configuration.'
8+
exit 1
9+
end
10+
611
config.redis = REDIS_SIDEKIQ_PARAMS
712

813
config.server_middleware do |chain|

0 commit comments

Comments
 (0)