mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-26 17:47:31 +01:00
Fix: Busywait loop in archiver and slow shutdown
Remove unblocking default in select Add shutdown handler with context and timeout
This commit is contained in:
@@ -373,6 +373,8 @@ func (s *Server) Shutdown(ctx context.Context) {
|
||||
memorystore.Shutdown()
|
||||
}
|
||||
|
||||
// Then, wait for any async archivings still pending...
|
||||
archiver.WaitForArchiving()
|
||||
// Shutdown archiver with 10 second timeout for fast shutdown
|
||||
if err := archiver.Shutdown(10 * time.Second); err != nil {
|
||||
cclog.Warnf("Archiver shutdown: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user