Refactor (ruby) redis configuration (#31694)
This commit is contained in:
parent
a23b3747ac
commit
388d5473e1
20 changed files with 295 additions and 90 deletions
|
@ -3,7 +3,7 @@
|
|||
require_relative '../../lib/mastodon/sidekiq_middleware'
|
||||
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = REDIS_SIDEKIQ_PARAMS
|
||||
config.redis = REDIS_CONFIGURATION.sidekiq
|
||||
|
||||
# This is used in Kubernetes setups, to signal that the Sidekiq process has started and will begin processing jobs
|
||||
# This comes from https://github.com/sidekiq/sidekiq/wiki/Kubernetes#sidekiq
|
||||
|
@ -51,7 +51,7 @@ Sidekiq.configure_server do |config|
|
|||
end
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = REDIS_SIDEKIQ_PARAMS
|
||||
config.redis = REDIS_CONFIGURATION.sidekiq
|
||||
|
||||
config.client_middleware do |chain|
|
||||
chain.add SidekiqUniqueJobs::Middleware::Client
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
require 'stoplight'
|
||||
|
||||
Rails.application.reloader.to_prepare do
|
||||
Stoplight.default_data_store = Stoplight::DataStore::Redis.new(RedisConfiguration.new.connection)
|
||||
Stoplight.default_data_store = Stoplight::DataStore::Redis.new(RedisConnection.new.connection)
|
||||
Stoplight.default_notifiers = [Stoplight::Notifier::Logger.new(Rails.logger)]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue