diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-11 18:31:24 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-11 18:31:24 +0100 |
commit | c501076fb082368325920461d8c6c6de21316dd0 (patch) | |
tree | a6f94050826cbb5609ac6a0f7fe0f72c4060d6c8 /guix-build-coordinator/datastore | |
parent | 967984886623e69838f5fb044f59719142e96f51 (diff) | |
download | build-coordinator-c501076fb082368325920461d8c6c6de21316dd0.tar build-coordinator-c501076fb082368325920461d8c6c6de21316dd0.tar.gz |
Remove datastore-select-allocated-builds
As it's a less well named copy of datastore-list-agent-builds.
Diffstat (limited to 'guix-build-coordinator/datastore')
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 2016443..b104528 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -103,7 +103,6 @@ datastore-fetch-build-to-allocate datastore-insert-to-allocated-builds datastore-remove-builds-from-plan - datastore-select-allocated-builds datastore-list-allocation-plan-builds)) (define-class <sqlite-datastore> (<abstract-datastore>) @@ -3411,47 +3410,6 @@ WHERE build_id IN (" ", ") ")"))))) -(define-method (datastore-select-allocated-builds - (datastore <sqlite-datastore>) - agent-id) - (call-with-worker-thread/delay-logging - (slot-ref datastore 'worker-reader-thread-channel) - (lambda (db) - (let ((statement - (sqlite-prepare - db - " -SELECT builds.uuid, derivations.name, builds.priority -FROM allocated_builds -INNER JOIN builds - ON allocated_builds.build_id = builds.id -INNER JOIN derivations - ON builds.derivation_id = derivations.id -WHERE agent_id = :agent_id" - #:cache? #t))) - - (sqlite-bind-arguments - statement - #:agent_id agent-id) - - (let ((result - (sqlite-fold - (lambda (row result) - (cons - (match row - (#(uuid derivation_name priority) - `((uuid . ,uuid) - ;; TODO Switch this to derivation_name - (derivation-name . ,derivation_name) - (priority . ,priority)))) - result)) - '() - statement))) - - (sqlite-reset statement) - - result))))) - (define-method (datastore-list-allocation-plan-builds (datastore <sqlite-datastore>) . |