Skip to content

Commit

Permalink
Release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed Aug 10, 2016
1 parent cef665a commit d6c2c74
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ test-redis-shutdown:
test-redis-clear:
@rm -rf "/tmp/redis_test_santiago*"

docker-rebuild: cross docker-worker-build docker-build

docker-build:
@docker build -t santiago .

Expand Down
2 changes: 1 addition & 1 deletion metadata/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
package metadata

//VERSION identifies current version of the application
var VERSION = "1.0.0"
var VERSION = "1.0.1"
29 changes: 16 additions & 13 deletions worker/handler/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (w *Worker) ProcessSubscription() error {
res, err := w.Client.LPop(w.Queue).Result()
if err != nil {
if err.Error() == "redis: nil" {
l.Info("No hooks to be processed.")
l.Debug("No hooks to be processed.")
return nil
}
l.Error("Worker failed to consume message from queue.", zap.Error(err))
Expand Down Expand Up @@ -348,18 +348,21 @@ func (w *Worker) Start() {
)

for {
raven.CapturePanic(func() {
l.Info("Subscribing to next message...")
err := w.ProcessSubscription()
if err != nil {
l.Warn("Failed to retrieve messages from queue.", zap.Error(err))
tags := map[string]string{
"queue": w.Queue,
"maxAttempts": string(w.MaxAttempts),
l.Info("Subscribing to next message...")

for i := 0; i < 50; i++ {
raven.CapturePanic(func() {
err := w.ProcessSubscription()
if err != nil {
l.Warn("Failed to retrieve messages from queue.", zap.Error(err))
tags := map[string]string{
"queue": w.Queue,
"maxAttempts": string(w.MaxAttempts),
}
raven.CaptureError(err, tags)
}
raven.CaptureError(err, tags)
}
time.Sleep(100 * time.Millisecond)
}, nil)
time.Sleep(50 * time.Millisecond)
}, nil)
}
}
}

0 comments on commit d6c2c74

Please sign in to comment.