From 22b2204187c7d8a0a6268ca8038b60fd5f5b825a Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 10 Dec 2020 20:38:58 +0000 Subject: Add a default of 0 for the build allocation plan metric --- guix-build-coordinator/datastore/sqlite.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'guix-build-coordinator/datastore') 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))))) -- cgit v1.2.3