diff options
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 10 | ||||
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 4 | ||||
-rw-r--r-- | guix-build-coordinator/hooks.scm | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index dfa00ca..ba5960e 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -261,11 +261,11 @@ (define datastore (build-coordinator-datastore build-coordinator)) (define (build-for-derivation-exists?) - (not - (null? (datastore-count-builds-for-derivation - datastore - derivation-file - #:include-canceled? #f)))) + (> (datastore-count-builds-for-derivation + datastore + derivation-file + #:include-canceled? #f) + 0)) (define (build-for-output-already-exists?) (let ((system (datastore-find-derivation-system datastore diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index fac7bbf..a20f6ed 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -1537,7 +1537,9 @@ WHERE derivation_name = :derivation" statement #:derivation derivation) - (let ((result (sqlite-step statement))) + (let ((result + (match (sqlite-step statement) + (#(x) x)))) (sqlite-reset statement) result))))) diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index 5790384..22c1650 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -237,12 +237,10 @@ (let* ((build-details (datastore-find-build datastore build-id)) (derivation-name (assq-ref build-details 'derivation-name)) - (all-builds-for-derivation (datastore-count-builds-for-derivation - datastore - derivation-name - #:include-canceled? #f)) - (all-builds-for-derivation-count (length all-builds-for-derivation))) - + (all-builds-for-derivation-count (datastore-count-builds-for-derivation + datastore + derivation-name + #:include-canceled? #f))) (when (= 1 all-builds-for-derivation-count) (display (simple-format #f "~A: submitting ~A retries for\n ~A\n" |