diff options
author | Christopher Baines <mail@cbaines.net> | 2025-02-16 12:44:17 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2025-02-16 12:44:17 +0000 |
commit | 9eed87b6e6a327275095c7e57542b4c84e4b11a5 (patch) | |
tree | 81d4114cddc1e1b963ad097b0867f8520effa728 /guix-build-coordinator/datastore/sqlite.scm | |
parent | eabd4e66853e977d10dadcc90f80b3fded26ec6e (diff) | |
download | build-coordinator-9eed87b6e6a327275095c7e57542b4c84e4b11a5.tar build-coordinator-9eed87b6e6a327275095c7e57542b4c84e4b11a5.tar.gz |
Support canceling builds by created_at
Diffstat (limited to 'guix-build-coordinator/datastore/sqlite.scm')
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index ef66a2c..556f36f 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -2445,6 +2445,8 @@ WHERE uuid = :uuid" (canceled 'unset) (priority-> 'unset) (priority-< 'unset) + (created-at-> 'unset) + (created-at-< 'unset) (after-id #f) (limit #f) ;; other-builds-dependent or no-dependent-builds @@ -2529,6 +2531,8 @@ SELECT id FROM tags WHERE key = :key" (not (null? not-systems)) (not (eq? priority-> 'unset)) (not (eq? priority-< 'unset)) + (not (eq? created-at-> 'unset)) + (not (eq? created-at-< 'unset)) (not (eq? processed 'unset)) (not (eq? canceled 'unset)) (not (eq? relationship 'unset)) @@ -2579,6 +2583,14 @@ INNER JOIN derivations (list (simple-format #f "priority < ~A" priority-<)) '()) + (if (string? created-at->) + (list + (simple-format #f "created_at > '~A'" created-at->)) + '()) + (if (string? created-at-<) + (list + (simple-format #f "created_at < '~A'" created-at-<)) + '()) (cond ((eq? processed #t) '("processed = 1")) ((eq? processed #f) '("processed = 0")) |