@@ -379,14 +379,11 @@ app.on("activate", () => {
379379} ) ;
380380
381381// Handle process signals to ensure clean shutdown
382- const handleShutdownSignal = async ( signal : string ) => {
383- console . log ( `Received ${ signal } , cleaning up agent subprocesses...` ) ;
382+ const handleShutdownSignal = async ( _signal : string ) => {
384383 try {
385384 const agentService = container . get < AgentService > ( MAIN_TOKENS . AgentService ) ;
386385 await agentService . cleanupAll ( ) ;
387- } catch ( err ) {
388- console . error ( "Error during signal cleanup:" , err ) ;
389- }
386+ } catch ( _err ) { }
390387 process . exit ( 0 ) ;
391388} ;
392389
@@ -395,24 +392,18 @@ process.on("SIGINT", () => handleShutdownSignal("SIGINT"));
395392process . on ( "SIGHUP" , ( ) => handleShutdownSignal ( "SIGHUP" ) ) ;
396393
397394// Handle uncaught exceptions to attempt cleanup before crash
398- process . on ( "uncaughtException" , async ( error ) => {
399- console . error ( "Uncaught exception, attempting cleanup:" , error ) ;
395+ process . on ( "uncaughtException" , async ( _error ) => {
400396 try {
401397 const agentService = container . get < AgentService > ( MAIN_TOKENS . AgentService ) ;
402398 await agentService . cleanupAll ( ) ;
403- } catch ( cleanupErr ) {
404- console . error ( "Error during exception cleanup:" , cleanupErr ) ;
405- }
399+ } catch ( _cleanupErr ) { }
406400 process . exit ( 1 ) ;
407401} ) ;
408402
409- process . on ( "unhandledRejection" , async ( reason ) => {
410- console . error ( "Unhandled rejection, attempting cleanup:" , reason ) ;
403+ process . on ( "unhandledRejection" , async ( _reason ) => {
411404 try {
412405 const agentService = container . get < AgentService > ( MAIN_TOKENS . AgentService ) ;
413406 await agentService . cleanupAll ( ) ;
414- } catch ( cleanupErr ) {
415- console . error ( "Error during rejection cleanup:" , cleanupErr ) ;
416- }
407+ } catch ( _cleanupErr ) { }
417408 process . exit ( 1 ) ;
418409} ) ;
0 commit comments