Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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
1
Merge Requests
1
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-workhorse
Commits
47e8615e
Commit
47e8615e
authored
Mar 10, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use a reconnect argument to Process(), it's unnecessary
parent
0e777472
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
internal/redis/keywatcher.go
internal/redis/keywatcher.go
+2
-6
main.go
main.go
+1
-1
No files found.
internal/redis/keywatcher.go
View file @
47e8615e
...
...
@@ -104,13 +104,10 @@ func dialPubSub(dialer redisDialerFunc) (redis.Conn, error) {
// Process redis subscriptions
//
// NOTE: There Can Only Be One!
// Reconnects is reconnect = true
func
Process
(
reconnect
bool
)
{
func
Process
()
{
log
.
Print
(
"Processing redis queue"
)
loop
:=
true
for
loop
{
loop
=
reconnect
for
{
log
.
Println
(
"Connecting to redis"
)
conn
,
err
:=
dialPubSub
(
workerDialFunc
)
...
...
@@ -123,7 +120,6 @@ func Process(reconnect bool) {
if
err
=
processInner
(
conn
);
err
!=
nil
{
helper
.
LogError
(
nil
,
fmt
.
Errorf
(
"Failed to process redis-queue: %s"
,
err
))
continue
}
}
}
...
...
main.go
View file @
47e8615e
...
...
@@ -134,7 +134,7 @@ func main() {
cfg
.
Redis
=
cfgFromFile
.
Redis
redis
.
Configure
(
cfg
.
Redis
,
redis
.
DefaultDialFunc
)
go
redis
.
Process
(
true
)
go
redis
.
Process
()
}
up
:=
wrapRaven
(
upstream
.
NewUpstream
(
cfg
))
...
...
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