Run manual diagnostic attachments in the background

This commit is contained in:
ayurishchev committed 2026-11-22 20:50:39 +03:00
1 parent d845a5e4b6
commit 89ac4d5bcd
40 files changed
+1560 -58

No files matched your search

+10
View File
@@ -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() {