Skip to content

Commit 8b6f476

Browse files
committed
fix: call activeWorkerrsGauge.Dec on cleanup for worker pod
1 parent f326e20 commit 8b6f476

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

internal/manager/rpaasPodWorker.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ func (w *RpaasPodWorker) Start() {
7474
func (w *RpaasPodWorker) Stop() {
7575
if w.StopChan != nil {
7676
w.StopChan <- struct{}{}
77-
// Decrement active worker count
78-
activeWorkersGaugeVec.WithLabelValues(w.Service, w.Instance, "pod").Dec()
7977
}
8078
}
8179

@@ -109,6 +107,7 @@ func (w *RpaasPodWorker) Work() {
109107
}
110108

111109
func (w *RpaasPodWorker) cleanup() {
110+
activeWorkersGaugeVec.WithLabelValues(w.Service, w.Instance, "pod").Dec()
112111
close(w.ReadZoneChan)
113112
close(w.WriteZoneChan)
114113
close(w.StopChan)

0 commit comments

Comments
 (0)