From 7af5dcfcbbab26c48f210e138667712b1f90288c Mon Sep 17 00:00:00 2001
From: Nick White <git@njw.name>
Date: Tue, 13 Aug 2019 16:34:52 +0100
Subject: Add bonus verbose log points

---
 pipelinepreprocess/main.go | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'pipelinepreprocess')

diff --git a/pipelinepreprocess/main.go b/pipelinepreprocess/main.go
index 604def3..dd122aa 100644
--- a/pipelinepreprocess/main.go
+++ b/pipelinepreprocess/main.go
@@ -180,6 +180,7 @@ func main() {
 			continue
 		}
 
+		verboselog.Println("Starting heartbeat every", HeartbeatTime, "seconds")
 		t := time.NewTicker(HeartbeatTime * time.Second)
 		go heartbeat(t, *msgResult.Messages[0].ReceiptHandle, prequrl, sqssvc)
 
@@ -201,6 +202,7 @@ func main() {
 		go up(upc, done, uploader, bookname)
 
 
+		verboselog.Println("Getting list of appropriate objects to download")
 		err = s3svc.ListObjectsV2Pages(&s3.ListObjectsV2Input{
 			Bucket: aws.String("rescribeinprogress"),
 			Prefix: aws.String(bookname),
@@ -216,6 +218,7 @@ func main() {
 		// wait for the done channel to be posted to
 		<-done
 
+		verboselog.Println("Sending", bookname, "to queue", ocrqurl)
 		_, err = sqssvc.SendMessage(&sqs.SendMessageInput{
 			MessageBody: aws.String(bookname),
 			QueueUrl: &ocrqurl,
@@ -226,6 +229,7 @@ func main() {
 
 		t.Stop()
 
+		verboselog.Println("Deleting original message from queue", prequrl)
 		_, err = sqssvc.DeleteMessage(&sqs.DeleteMessageInput{
 			QueueUrl: &prequrl,
 			ReceiptHandle: msgResult.Messages[0].ReceiptHandle,
-- 
cgit v1.2.1-24-ge1ad