mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-07-19 03:11:41 +02:00
Handle shutdown sequentially
This commit is contained in:
@@ -151,11 +151,8 @@ func (cm *collectorManager) AddOutput(output chan lp.CCMetric) {
|
||||
|
||||
// Close finishes / stops the metric collector manager
|
||||
func (cm *collectorManager) Close() {
|
||||
select {
|
||||
case cm.done <- true:
|
||||
default:
|
||||
}
|
||||
cclog.ComponentDebug("CollectorManager", "CLOSE")
|
||||
cm.done <- true
|
||||
}
|
||||
|
||||
// New creates a new initialized metric collector manager
|
||||
|
@@ -10,6 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
Reference in New Issue
Block a user