summaryrefslogtreecommitdiff
path: root/bookpipeline/cmd/bookpipeline/main.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-09-16 14:57:14 +0100
committerNick White <git@njw.name>2019-09-16 14:57:14 +0100
commit5fe9dc3a403cdfe0b41830aac16ef8b02f7e0e4e (patch)
tree0218985d518e23c7ea5a718dbbf1fad37a9ac6b8 /bookpipeline/cmd/bookpipeline/main.go
parent7b79288b55077c5f378b5f5e45f2ac8fd3be76ee (diff)
Be more careful to try to grab the message after a heartbeat failure more quickly
Rather than waiting for the whole length of a visibility timeout, in which time another process may grab the message, instead wait a short amount of time, each time the message is searched for. Also add a bit more logging.
Diffstat (limited to 'bookpipeline/cmd/bookpipeline/main.go')
-rw-r--r--bookpipeline/cmd/bookpipeline/main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/bookpipeline/cmd/bookpipeline/main.go b/bookpipeline/cmd/bookpipeline/main.go
index f1309ca..f8b0b68 100644
--- a/bookpipeline/cmd/bookpipeline/main.go
+++ b/bookpipeline/cmd/bookpipeline/main.go
@@ -322,8 +322,10 @@ func processBook(msg bookpipeline.Qmsg, conn Pipeliner, process func(chan string
case m, ok := <-msgc :
if ok {
msg = m
+ conn.GetLogger().Println("Using new message handle to delete message from old queue")
}
default:
+ conn.GetLogger().Println("Using original message handle to delete message from old queue")
}
conn.GetLogger().Println("Deleting original message from queue", fromQueue)