From d43c11bf653bfe3c1ad1ed277f1ec08bf155cf98 Mon Sep 17 00:00:00 2001
From: Nick White <git@njw.name>
Date: Mon, 7 Oct 2019 22:53:55 +0100
Subject: Ensure wipe pipeline uses the expected png files

---
 bookpipeline/cmd/bookpipeline/main.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'bookpipeline/cmd')

diff --git a/bookpipeline/cmd/bookpipeline/main.go b/bookpipeline/cmd/bookpipeline/main.go
index 7d04e3a..59ece72 100644
--- a/bookpipeline/cmd/bookpipeline/main.go
+++ b/bookpipeline/cmd/bookpipeline/main.go
@@ -386,6 +386,7 @@ func main() {
 	}
 
 	origPattern := regexp.MustCompile(`[0-9]{4}.jpg$`) // TODO: match alternative file naming
+	wipePattern := regexp.MustCompile(`[0-9]{4}.png$`)
 	preprocessedPattern := regexp.MustCompile(`_bin[0-9].[0-9].png$`)
 	ocredPattern := regexp.MustCompile(`.hocr$`)
 
@@ -446,7 +447,7 @@ func main() {
 				continue
 			}
 			verboselog.Println("Message received on wipeonly queue, processing", msg.Body)
-			err = processBook(msg, conn, wipe, origPattern, conn.WipeQueueId(), conn.OCRQueueId())
+			err = processBook(msg, conn, wipe, wipePattern, conn.WipeQueueId(), conn.OCRQueueId())
 			if err != nil {
 				log.Println("Error during wipe", err)
 			}
-- 
cgit v1.2.1-24-ge1ad