summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-08-13 16:34:52 +0100
committerNick White <git@njw.name>2019-08-13 16:34:52 +0100
commit7af5dcfcbbab26c48f210e138667712b1f90288c (patch)
tree0446008e1296b22bf3baddcdd0f917ebf43cf5f5
parent504ca81a2c6654f9362b6f452f69dbaff1275e4f (diff)
Add bonus verbose log points
-rw-r--r--pipelinepreprocess/main.go4
1 files changed, 4 insertions, 0 deletions
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,