feat: implement comprehensive process cleanup system
- Added aggressive cleanup system that runs every 5 minutes to kill orphaned processes - Enhanced process cleanup with better signal handling and forced cleanup - Added startup initialization system to ensure cleanup is properly loaded - Integrated cleanup system into app layouts for automatic initialization - Added zombie process cleanup and temp directory cleanup - Improved Docker container restart behavior for proper process cleanup - Resolves issue with zombie Chrome processes accumulating
This commit is contained in:
16
lib/startup.ts
Normal file
16
lib/startup.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// Startup initialization for the trading bot
|
||||
// This file initializes critical systems and cleanup handlers
|
||||
|
||||
import processCleanup from './process-cleanup'
|
||||
import aggressiveCleanup from './aggressive-cleanup'
|
||||
|
||||
// Initialize cleanup system
|
||||
console.log('🚀 Initializing trading bot systems...')
|
||||
console.log('🧹 Process cleanup handlers initialized')
|
||||
console.log('🧹 Aggressive cleanup system initialized')
|
||||
|
||||
// Export cleanup for manual access
|
||||
export { processCleanup, aggressiveCleanup }
|
||||
|
||||
// Initialize on import
|
||||
export default true
|
||||
Reference in New Issue
Block a user