21126: Move BlobDeleteConcurrency==0 check up in the stack.
[arvados.git] / services / keepstore / command.go
index 555f16dfe1f290edbd1797437efd3842ad29dd4e..9d220022ab3cf5e05508cc36d2268ca94b08fae9 100644 (file)
@@ -208,7 +208,9 @@ func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token str
        }
        h.keepClient.Arvados.ApiToken = fmt.Sprintf("%x", rand.Int63())
 
-       if d := h.Cluster.Collections.BlobTrashCheckInterval.Duration(); d > 0 {
+       if d := h.Cluster.Collections.BlobTrashCheckInterval.Duration(); d > 0 &&
+               h.Cluster.Collections.BlobTrash &&
+               h.Cluster.Collections.BlobDeleteConcurrency > 0 {
                go emptyTrash(h.volmgr.writables, d)
        }