mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Allow to shutdown redfish receiver during metric read
This commit is contained in:
parent
31c5c89a5a
commit
8c73095548
@ -146,7 +146,17 @@ func (r *RedfishReceiver) Start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Distribute client configs to workers
|
// Distribute client configs to workers
|
||||||
|
clientConfigLoop:
|
||||||
for i := range r.config.ClientConfigs {
|
for i := range r.config.ClientConfigs {
|
||||||
|
// Check done channel status
|
||||||
|
select {
|
||||||
|
case _, ok := <-r.done:
|
||||||
|
if !ok {
|
||||||
|
break clientConfigLoop
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
workerInput <- i
|
workerInput <- i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user