summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-10-29 08:58:39 +0000
committerNick White <git@njw.name>2019-10-29 08:58:39 +0000
commit81e2a0e6da84bec5f4577ac67c7d9fa6804a6773 (patch)
tree785f689266d8acd1e5fc14fe3723b335e46f0baf
parentcade266e1d2e07c0f3539383375012cfd25b5be7 (diff)
Debugging: kill process immediately a heartbeat error is detected (systemd will restart it soon thereafter)
-rw-r--r--cmd/bookpipeline/main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/bookpipeline/main.go b/cmd/bookpipeline/main.go
index f7da588..3f8303f 100644
--- a/cmd/bookpipeline/main.go
+++ b/cmd/bookpipeline/main.go
@@ -255,6 +255,8 @@ 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 {
+ // This is for better debugging of the heartbeat issue
+ os.Exit(1)
// 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