mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-16 16:16:43 +10:00
Merge branch 'redis_config_consistency' into 'master'
Redis configuration consistency Related https://gitlab.com/gitlab-org/gitlab-ce/commit/cf669551f69edd66913d22c96cf1de1302e7990e See merge request !3697
This commit is contained in:
@@ -14,7 +14,7 @@ if Rails.env.test?
|
||||
Gitlab::Application.config.session_store :cookie_store, key: "_gitlab_session"
|
||||
else
|
||||
redis_config = Gitlab::Redis.redis_store_options
|
||||
redis_config[:namespace] = 'session:gitlab'
|
||||
redis_config[:namespace] = Gitlab::Redis::SESSION_NAMESPACE
|
||||
|
||||
Gitlab::Application.config.session_store(
|
||||
:redis_store, # Using the cookie_store would enable session replay attacks.
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
SIDEKIQ_REDIS_NAMESPACE = 'resque:gitlab'
|
||||
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = {
|
||||
url: Gitlab::Redis.url,
|
||||
namespace: SIDEKIQ_REDIS_NAMESPACE
|
||||
namespace: Gitlab::Redis::SIDEKIQ_NAMESPACE
|
||||
}
|
||||
|
||||
config.server_middleware do |chain|
|
||||
@@ -30,6 +28,6 @@ end
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = {
|
||||
url: Gitlab::Redis.url,
|
||||
namespace: SIDEKIQ_REDIS_NAMESPACE
|
||||
namespace: Gitlab::Redis::SIDEKIQ_NAMESPACE
|
||||
}
|
||||
end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module Gitlab
|
||||
class Redis
|
||||
CACHE_NAMESPACE = 'cache:gitlab'
|
||||
SESSION_NAMESPACE = 'session:gitlab'
|
||||
SIDEKIQ_NAMESPACE = 'resque:gitlab'
|
||||
|
||||
attr_reader :url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user