Skip to content

Commit

Permalink
Fix: Making the logs quieter (All-Hands-AI#5525)
Browse files Browse the repository at this point in the history
  • Loading branch information
tofarr authored Dec 13, 2024
1 parent 8300cf0 commit 2fb45d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openhands/utils/shutdown_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _register_signal_handler(sig: signal.Signals):
original_handler = None

def handler(sig_: int, frame: FrameType | None):
logger.info(f'shutdown_signal:{sig_}')
logger.debug(f'shutdown_signal:{sig_}')
global _should_exit
_should_exit = True
if original_handler:
Expand All @@ -34,15 +34,15 @@ def _register_signal_handlers():
return
_should_exit = False

logger.info('_register_signal_handlers')
logger.debug('_register_signal_handlers')

# Check if we're in the main thread of the main interpreter
if threading.current_thread() is threading.main_thread():
logger.info('_register_signal_handlers:main_thread')
logger.debug('_register_signal_handlers:main_thread')
for sig in HANDLED_SIGNALS:
_register_signal_handler(sig)
else:
logger.info('_register_signal_handlers:not_main_thread')
logger.debug('_register_signal_handlers:not_main_thread')


def should_exit() -> bool:
Expand Down

0 comments on commit 2fb45d4

Please sign in to comment.