mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:57:36 +08:00
update sidekiq initializer to use the pausable middleware
This commit is contained in:
parent
8344f0d8fd
commit
0e686aca95
|
@ -1,7 +1,17 @@
|
||||||
|
require "sidekiq/pausable"
|
||||||
|
|
||||||
sidekiq_redis = { url: $redis.url, namespace: 'sidekiq' }
|
sidekiq_redis = { url: $redis.url, namespace: 'sidekiq' }
|
||||||
|
|
||||||
|
Sidekiq.configure_client do |config|
|
||||||
|
config.redis = sidekiq_redis
|
||||||
|
end
|
||||||
|
|
||||||
Sidekiq.configure_server do |config|
|
Sidekiq.configure_server do |config|
|
||||||
config.redis = sidekiq_redis
|
config.redis = sidekiq_redis
|
||||||
|
# add our pausable middleware
|
||||||
|
config.server_middleware do |chain|
|
||||||
|
chain.add Sidekiq::Pausable
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Sidekiq.server?
|
if Sidekiq.server?
|
||||||
|
@ -32,6 +42,4 @@ if Sidekiq.server?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Sidekiq.configure_client { |config| config.redis = sidekiq_redis }
|
|
||||||
Sidekiq.logger.level = Logger::WARN
|
Sidekiq.logger.level = Logger::WARN
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user