Run manual diagnostic attachments in the background
This commit is contained in:
1 parent
d845a5e4b6
commit
89ac4d5bcd
40 files changed
+1560
-58
No files matched your search
@@ -77,6 +77,16 @@ func run(configPath string, log *slog.Logger) error {
|
||||
httpServer := &http.Server{Addr: cfg.Server.ListenAddr, Handler: srv.Handler()}
|
||||
|
||||
go runOrchestratorLoop(ctx, orch, cfg, log)
|
||||
diagnosticCtx, stopDiagnostics := context.WithCancel(ctx)
|
||||
diagnosticsDone := make(chan struct{})
|
||||
go func() {
|
||||
defer close(diagnosticsDone)
|
||||
orch.RunDiagnosticOperations(diagnosticCtx)
|
||||
}()
|
||||
defer func() {
|
||||
stopDiagnostics()
|
||||
<-diagnosticsDone
|
||||
}()
|
||||
|
||||
errCh := make(chan error, 1)
|
||||
go func() {
|
||||
|
||||
Reference in new issue
Block a user