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
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
nexedi
gitlab-shell
Commits
0a24df33
Commit
0a24df33
authored
Aug 18, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sentinel connection parameters in `config.yml` file
parent
4f8e91fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
config.yml.example
config.yml.example
+9
-1
lib/gitlab_net.rb
lib/gitlab_net.rb
+6
-0
No files found.
config.yml.example
View file @
0a24df33
...
...
@@ -38,8 +38,16 @@ redis:
# port: 6379
# pass: redispass # Allows you to specify the password for Redis
database: 0
socket: /var/run/redis/redis.sock # Comment out this line if you want to use TCP
socket: /var/run/redis/redis.sock # Comment out this line if you want to use TCP
or Sentinel
namespace: resque:gitlab
# sentinels:
# -
# host: 127.0.0.1
# port: 26380
# -
# host: 127.0.0.1
# port: 26381
# Log file.
# Default is gitlab-shell.log in the root directory.
...
...
lib/gitlab_net.rb
View file @
0a24df33
...
...
@@ -81,6 +81,12 @@ class GitlabNet
db:
database
}
if
redis_config
.
has_key?
(
'sentinels'
)
params
[
:sentinels
]
=
redis_config
[
'sentinels'
]
.
select
{
|
s
|
s
[
'host'
]
&&
s
[
'port'
]
}
.
map
{
|
s
|
{
host:
s
[
'host'
],
port:
s
[
'port'
]
}
}
end
if
redis_config
.
has_key?
(
"socket"
)
params
=
{
path:
redis_config
[
'socket'
],
db:
database
}
elsif
redis_config
.
has_key?
(
"pass"
)
...
...
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