diff options
author | Nick White <git@njw.name> | 2022-02-28 16:17:35 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2022-02-28 16:17:35 +0000 |
commit | 21d49b546a27de6c53d8fe7d1a68d5a3b5506c93 (patch) | |
tree | 729663de5863c125fad24d37df5147c2569771d1 /internal/pipeline/put.go | |
parent | 54aca8994863f5c58bce0224bc943b81c60f5d04 (diff) |
Add PreNoWipe queue, that just does binarisation but no wiping
Diffstat (limited to 'internal/pipeline/put.go')
-rw-r--r-- | internal/pipeline/put.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/pipeline/put.go b/internal/pipeline/put.go index aba9e0e..47729b5 100644 --- a/internal/pipeline/put.go +++ b/internal/pipeline/put.go @@ -83,7 +83,10 @@ func CheckImages(ctx context.Context, dir string) error { // DetectQueueType detects which queue to use based on the preponderance // of files of a particular extension in a directory -func DetectQueueType(dir string, conn Queuer) string { +func DetectQueueType(dir string, conn Queuer, nowipe bool) string { + if nowipe { + return conn.PreNoWipeQueueId() + } pngdirs, _ := filepath.Glob(dir + "/*.png") jpgdirs, _ := filepath.Glob(dir + "/*.jpg") pngcount := len(pngdirs) |