mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-21 07:17:30 +01:00
fix: Blocking ReceiveNats call
Entire-Checkpoint: 38a235c86ceb
This commit is contained in:
@@ -184,10 +184,11 @@ func Init(rawConfig json.RawMessage, metrics map[string]MetricConfig, wg *sync.W
|
|||||||
shutdownFuncMu.Unlock()
|
shutdownFuncMu.Unlock()
|
||||||
|
|
||||||
if Keys.Subscriptions != nil {
|
if Keys.Subscriptions != nil {
|
||||||
err = ReceiveNats(ms, Keys.NumWorkers, ctx)
|
wg.Go(func() {
|
||||||
if err != nil {
|
if err := ReceiveNats(ms, Keys.NumWorkers, ctx); err != nil {
|
||||||
cclog.Fatal(err)
|
cclog.Fatal(err)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user