diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2015-11-27 18:41:21 -0200 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-08-04 18:55:37 +0200 |
commit | 2625a4ccbd28805e8a657776ca09e080cc826d55 (patch) | |
tree | 699065ebdafda4f1ff299c362eaa973bed0c2fa8 /config | |
parent | ef6043880ee492e6c8fd7672d0e36ca81a62cfc9 (diff) | |
download | gitlab-ce-2625a4ccbd28805e8a657776ca09e080cc826d55.tar.gz |
Make sidekiq get config settings from Gitlab::RedisConfig
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/sidekiq.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index cf49ec2194c..f7e714cd6bc 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,8 +1,9 @@ +# Custom Redis configuration +redis_config_hash = Gitlab::Redis.params +redis_config_hash[:namespace] = Gitlab::Redis::SIDEKIQ_NAMESPACE + Sidekiq.configure_server do |config| - config.redis = { - url: Gitlab::Redis.url, - namespace: Gitlab::Redis::SIDEKIQ_NAMESPACE - } + config.redis = redis_config_hash config.server_middleware do |chain| chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger if ENV['SIDEKIQ_LOG_ARGUMENTS'] @@ -39,8 +40,5 @@ Sidekiq.configure_server do |config| end Sidekiq.configure_client do |config| - config.redis = { - url: Gitlab::Redis.url, - namespace: Gitlab::Redis::SIDEKIQ_NAMESPACE - } + config.redis = redis_config_hash end |