diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-10 10:17:04 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-10 10:17:04 +0100 |
commit | 272106af10e85e2b30faa0a601aed517c41efda0 (patch) | |
tree | 7a18d633d9b1ef320d4505f58989050119c2a58f | |
parent | 04506d9c9619dafaf5dcd69c0342bd1823fe9012 (diff) | |
download | build-coordinator-272106af10e85e2b30faa0a601aed517c41efda0.tar build-coordinator-272106af10e85e2b30faa0a601aed517c41efda0.tar.gz |
Include the build priority when agents fetch builds
This means the agent can use it to prioritise various things.
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 36a9e5c..86fe6d4 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -3305,7 +3305,7 @@ INSERT INTO build_allocation_agent_requested_systems (agent_id, system_id) VALUE db ;; This needs to guard against the plan being out of date " -SELECT builds.uuid, derivations.id, derivations.name +SELECT builds.uuid, derivations.id, derivations.name, builds.priority FROM builds INNER JOIN build_allocation_plan ON builds.id = build_allocation_plan.build_id @@ -3342,7 +3342,7 @@ WHERE build_derivation_outputs.derivation_id = :derivation_id (let loop ((build-details (sqlite-step statement))) (match build-details (#f #f) - (#(uuid derivation-id derivation-name) + (#(uuid derivation-id derivation-name priority) (sqlite-bind-arguments output-conflicts-statement #:agent_id agent-id @@ -3354,7 +3354,8 @@ WHERE build_derivation_outputs.derivation_id = :derivation_id (if (eq? #f result) `((uuid . ,uuid) ;; TODO Change this to derivation_name - (derivation-name . ,derivation-name)) + (derivation-name . ,derivation-name) + (priority . ,priority)) (loop (sqlite-step statement)))))))) (sqlite-bind-arguments |