From 38dbdd0b21fb363e3f63fd3ea50272975e98eb77 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 3 Dec 2020 15:13:22 +0000 Subject: Don't upload binarised pdf twice needlessly This can also result in the file being uploaded twice simultaneously, as up() is running in a separate goroutine. This can cause failures on Windows as the file is attempted to be removed by one upload process while being open to upload by the other process. Probably it could also fail if the process completed by one (so the file was deleted) before being started by the other. --- internal/pipeline/pipeline.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/pipeline/pipeline.go b/internal/pipeline/pipeline.go index 20400ad..13339d7 100644 --- a/internal/pipeline/pipeline.go +++ b/internal/pipeline/pipeline.go @@ -358,11 +358,6 @@ func Analyse(conn Pipeliner) func(chan string, chan string, chan error, *log.Log return } up <- fn - key := bookname + "/" + bookname + ".binarised.pdf" - conn.Log("Uploading", key) - err := conn.Upload(conn.WIPStorageId(), key, fn) - if err != nil { - } } for _, pg := range colourimgs { -- cgit v1.2.1-24-ge1ad