mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
update sidekiq initializer to use the pausable middleware
This commit is contained in:
parent
8344f0d8fd
commit
0e686aca95
1 changed files with 10 additions and 2 deletions
|
@ -1,7 +1,17 @@
|
|||
require "sidekiq/pausable"
|
||||
|
||||
sidekiq_redis = { url: $redis.url, namespace: 'sidekiq' }
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = sidekiq_redis
|
||||
end
|
||||
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = sidekiq_redis
|
||||
# add our pausable middleware
|
||||
config.server_middleware do |chain|
|
||||
chain.add Sidekiq::Pausable
|
||||
end
|
||||
end
|
||||
|
||||
if Sidekiq.server?
|
||||
|
@ -32,6 +42,4 @@ if Sidekiq.server?
|
|||
end
|
||||
end
|
||||
|
||||
Sidekiq.configure_client { |config| config.redis = sidekiq_redis }
|
||||
Sidekiq.logger.level = Logger::WARN
|
||||
|
||||
|
|
Loading…
Reference in a new issue