refactor(lifecycle): set background threads to daemon mode

This commit is contained in:
InfinityPacer
2024-10-18 00:37:20 +08:00
parent 62ac03fb29
commit 348923aaa6
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ class Telegram:
logger.error(f"Telegram消息接收服务异常{str(err)}")
# 启动线程来运行 infinity_polling
self._polling_thread = threading.Thread(target=run_polling)
self._polling_thread = threading.Thread(target=run_polling, daemon=True)
self._polling_thread.start()
logger.info("Telegram消息接收服务启动")