summaryrefslogtreecommitdiff
path: root/cmd/bookpipeline/main.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-10-28 15:51:44 +0000
committerNick White <git@njw.name>2019-10-28 16:04:03 +0000
commitffbda7e158e21b2889b1726ae398f3822a3f51df (patch)
tree85941ec0676be2215136312a18edfa13a07f4349 /cmd/bookpipeline/main.go
parent01c99da2c2c7960d0cf6e0a49ede919948898a2c (diff)
Try to fix heartbeat renew issue more fully
This approach first sets the remaining visibility timeout to zero. This should ensure that the message is available to re-find as soon as the process looks for it. Correspondingly the delay between checks is much shorter, as there shouldn't be a reason for much delay.
Diffstat (limited to 'cmd/bookpipeline/main.go')
-rw-r--r--cmd/bookpipeline/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/bookpipeline/main.go b/cmd/bookpipeline/main.go
index 2179549..f7da588 100644
--- a/cmd/bookpipeline/main.go
+++ b/cmd/bookpipeline/main.go
@@ -255,6 +255,10 @@ func heartbeat(conn Pipeliner, t *time.Ticker, msg bookpipeline.Qmsg, queue stri
for range t.C {
m, err := conn.QueueHeartbeat(currentmsg, queue, HeartbeatTime*2)
if err != nil {
+ // TODO: would be better to ensure this error stops any running
+ // processes, as they will ultimately fail in the case of
+ // it. could do this by setting a global variable that
+ // processes check each time they loop.
errc <- err
t.Stop()
return