From 8b4aff385788dfbf6babbfebe04e3d4d09b59ea8 Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Tue, 19 Jul 2022 13:19:54 +0100 Subject: [PATCH] worker/server: remove duplicate metrics Remove a duplicate call to the `DequeueJobMetrics` function in the worker server. This duplicate call resulted in negative numbers for pending jobs in the prometheus metrics. --- internal/worker/server.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/worker/server.go b/internal/worker/server.go index 98d8c6e26..7c0e450fd 100644 --- a/internal/worker/server.go +++ b/internal/worker/server.go @@ -505,8 +505,6 @@ func (s *Server) requestJob(ctx context.Context, arch string, jobTypes []string, jobType, channel, status, _, err := s.jobStatus(jobId, nil) if err != nil { logrus.Errorf("error retrieving job status: %v", err) - } else { - prometheus.DequeueJobMetrics(status.Queued, status.Started, jobType, channel) } // Record how long the job has been pending for, that is either how