fixup! fixup! Weekend fun with further optimisations.

This commit is contained in:
2025-09-14 01:54:06 +01:00
parent 0d88612d8c
commit 9af8939f72
2 changed files with 58 additions and 12 deletions
+3 -4
View File
@@ -267,11 +267,10 @@ func NewSessionManager(encryptionKey string, forceHTTPS bool, cookieDomain strin
cancel: cancel,
}
// Initialize memory monitoring
registry := GetGlobalTaskRegistry()
sm.memoryMonitor = NewTaskMemoryMonitor(logger, registry)
// Initialize global memory monitoring (singleton)
sm.memoryMonitor = GetGlobalTaskMemoryMonitor(logger)
// Start memory monitoring every 30 seconds
// Start memory monitoring every 30 seconds (will skip if already started)
if err := sm.memoryMonitor.Start(30 * time.Second); err != nil {
logger.Infof("Failed to start memory monitoring: %v", err)
}