diff options
author | Christopher Baines <mail@cbaines.net> | 2020-12-10 20:38:58 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-12-10 20:38:58 +0000 |
commit | 22b2204187c7d8a0a6268ca8038b60fd5f5b825a (patch) | |
tree | 81bbe2131ae306089a0b44727e5e6002554b7ed5 | |
parent | dfc3d8f487bcbbcbd6f857adfba3e1f0689fd7af (diff) | |
download | build-coordinator-22b2204187c7d8a0a6268ca8038b60fd5f5b825a.tar build-coordinator-22b2204187c7d8a0a6268ca8038b60fd5f5b825a.tar.gz |
Add a default of 0 for the build allocation plan metric
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 626fd4e..4ecd83e 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -2025,10 +2025,11 @@ WHERE agent_id = :agent_id" (slot-ref datastore 'metrics-registry) "build_allocation_plan_total"))) (metric-set allocation-plan-metric - (assoc-ref - (datastore-count-build-allocation-plan-entries - datastore) - agent-id) + (or (assoc-ref + (datastore-count-build-allocation-plan-entries + datastore) + agent-id) + 0) #:label-values `((agent_id . ,agent-id))))) |