diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-09 18:22:26 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-09 18:22:26 -0500 |
commit | ee721e12ab00dd48a27bfe3f346498374473600b (patch) | |
tree | f74dd7c8a76b93492fe92fe88214f620b477a871 /config/initializers | |
parent | bd1b8ae9bbbe8c81d5f1c18a5c8d86fbcb4f1dbf (diff) | |
parent | ed0a7c254ab32130296fb7ee467f655d200d7854 (diff) | |
download | gitlab-ce-ee721e12ab00dd48a27bfe3f346498374473600b.tar.gz |
Merge branch 'brodock/gitlab-ce-feature/redis-sentinel'
# Conflicts:
# lib/gitlab/redis.rb
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/session_store.rb | 4 | ||||
-rw-r--r-- | config/initializers/sidekiq.rb | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 0d9d87bac00..70be2617cab 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -13,9 +13,9 @@ end if Rails.env.test? Gitlab::Application.config.session_store :cookie_store, key: "_gitlab_session" else - redis_config = Gitlab::Redis.redis_store_options + redis_config = Gitlab::Redis.params redis_config[:namespace] = Gitlab::Redis::SESSION_NAMESPACE - + Gitlab::Application.config.session_store( :redis_store, # Using the cookie_store would enable session replay attacks. servers: redis_config, 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 |