Skip to content

Commit 91e2a23

Browse files
committed
Minor fixups
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 09f7305 commit 91e2a23

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

coderd/notifications/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func (m *Manager) syncUpdates(ctx context.Context) {
222222
nSuccess := len(m.success)
223223
nFailure := len(m.failure)
224224

225-
m.metrics.PendingUpdates.Set(float64(len(m.success) + len(m.failure)))
225+
m.metrics.PendingUpdates.Set(float64(nSuccess + nFailure))
226226

227227
// Nothing to do.
228228
if nSuccess+nFailure == 0 {

coderd/notifications/metrics_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ func TestMetrics(t *testing.T) {
153153
"coderd_notifications_inflight_dispatches": func(metric *dto.Metric, series string) bool {
154154
// This is a gauge, so it can be difficult to get the timing right to catch it.
155155
// See TestInflightDispatchesMetric for a more precise test.
156-
// TODO: write it
157156
return true
158157
},
159158
"coderd_notifications_pending_updates": func(metric *dto.Metric, series string) bool {

0 commit comments

Comments
 (0)