Fix: Making the logs quieter (#5525)

This commit is contained in:
tofarr 2024-12-12 19:36:13 -07:00 committed by GitHub
parent 8300cf0436
commit 2fb45d410d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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:
@ -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: