Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
00e30138
Commit
00e30138
authored
Sep 12, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #174 from UniIsland/redis-custom-database
support using custom redis database, fixes #173
parents
24dda4a8
4228aaca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
config.yml.example
config.yml.example
+1
-0
lib/gitlab_config.rb
lib/gitlab_config.rb
+4
-3
spec/gitlab_config_spec.rb
spec/gitlab_config_spec.rb
+1
-0
No files found.
config.yml.example
View file @
00e30138
...
...
@@ -31,6 +31,7 @@ redis:
port: 6379
# pass: redispass # Allows you to specify the password for Redis
# socket: /tmp/redis.socket # Only define this if you want to use sockets
database: 0
namespace: resque:gitlab
# Log file.
...
...
lib/gitlab_config.rb
View file @
00e30138
...
...
@@ -54,13 +54,14 @@ class GitlabConfig
# for users that haven't updated their configuration
%W(env -i redis-cli)
else
redis
[
'database'
]
||=
0
if
redis
.
has_key?
(
"socket"
)
%W(
#{
redis
[
'bin'
]
}
-s
#{
redis
[
'socket'
]
}
)
%W(
#{
redis
[
'bin'
]
}
-s
#{
redis
[
'socket'
]
}
-n
#{
redis
[
'database'
]
}
)
else
if
redis
.
has_key?
(
"pass"
)
%W(
#{
redis
[
'bin'
]
}
-h
#{
redis
[
'host'
]
}
-p
#{
redis
[
'port'
]
}
-a
#{
redis
[
'pass'
]
}
)
%W(
#{
redis
[
'bin'
]
}
-h
#{
redis
[
'host'
]
}
-p
#{
redis
[
'port'
]
}
-
n
#{
redis
[
'database'
]
}
-
a
#{
redis
[
'pass'
]
}
)
else
%W(
#{
redis
[
'bin'
]
}
-h
#{
redis
[
'host'
]
}
-p
#{
redis
[
'port'
]
}
)
%W(
#{
redis
[
'bin'
]
}
-h
#{
redis
[
'host'
]
}
-p
#{
redis
[
'port'
]
}
-n
#{
redis
[
'database'
]
}
)
end
end
end
...
...
spec/gitlab_config_spec.rb
View file @
00e30138
...
...
@@ -11,6 +11,7 @@ describe GitlabConfig do
it
{
should
have_key
(
'bin'
)
}
it
{
should
have_key
(
'host'
)
}
it
{
should
have_key
(
'port'
)
}
it
{
should
have_key
(
'database'
)
}
it
{
should
have_key
(
'namespace'
)
}
end
...
...
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