Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2244aaf9
Commit
2244aaf9
authored
Apr 13, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redis configuration consistency
parent
8cb41f19
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
config/initializers/session_store.rb
config/initializers/session_store.rb
+1
-1
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+2
-4
lib/gitlab/redis.rb
lib/gitlab/redis.rb
+2
-0
No files found.
config/initializers/session_store.rb
View file @
2244aaf9
...
@@ -14,7 +14,7 @@ if Rails.env.test?
...
@@ -14,7 +14,7 @@ if Rails.env.test?
Gitlab
::
Application
.
config
.
session_store
:cookie_store
,
key:
"_gitlab_session"
Gitlab
::
Application
.
config
.
session_store
:cookie_store
,
key:
"_gitlab_session"
else
else
redis_config
=
Gitlab
::
Redis
.
redis_store_options
redis_config
=
Gitlab
::
Redis
.
redis_store_options
redis_config
[
:namespace
]
=
'session:gitlab'
redis_config
[
:namespace
]
=
Gitlab
::
Redis
::
SESSION_NAMESPACE
Gitlab
::
Application
.
config
.
session_store
(
Gitlab
::
Application
.
config
.
session_store
(
:redis_store
,
# Using the cookie_store would enable session replay attacks.
:redis_store
,
# Using the cookie_store would enable session replay attacks.
...
...
config/initializers/sidekiq.rb
View file @
2244aaf9
SIDEKIQ_REDIS_NAMESPACE
=
'resque:gitlab'
Sidekiq
.
configure_server
do
|
config
|
Sidekiq
.
configure_server
do
|
config
|
config
.
redis
=
{
config
.
redis
=
{
url:
Gitlab
::
Redis
.
url
,
url:
Gitlab
::
Redis
.
url
,
namespace:
SIDEKIQ_REDIS
_NAMESPACE
namespace:
Gitlab
::
Redis
::
SIDEKIQ
_NAMESPACE
}
}
config
.
server_middleware
do
|
chain
|
config
.
server_middleware
do
|
chain
|
...
@@ -30,6 +28,6 @@ end
...
@@ -30,6 +28,6 @@ end
Sidekiq
.
configure_client
do
|
config
|
Sidekiq
.
configure_client
do
|
config
|
config
.
redis
=
{
config
.
redis
=
{
url:
Gitlab
::
Redis
.
url
,
url:
Gitlab
::
Redis
.
url
,
namespace:
SIDEKIQ_REDIS
_NAMESPACE
namespace:
Gitlab
::
Redis
::
SIDEKIQ
_NAMESPACE
}
}
end
end
lib/gitlab/redis.rb
View file @
2244aaf9
module
Gitlab
module
Gitlab
class
Redis
class
Redis
CACHE_NAMESPACE
=
'cache:gitlab'
CACHE_NAMESPACE
=
'cache:gitlab'
SESSION_NAMESPACE
=
'session:gitlab'
SIDEKIQ_NAMESPACE
=
'resque:gitlab'
attr_reader
:url
attr_reader
:url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment