mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-14 10:10:20 +08:00
refactor(lifecycle): set background threads to daemon mode
This commit is contained in:
@@ -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消息接收服务启动")
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class Monitor(metaclass=Singleton):
|
||||
self.stop()
|
||||
|
||||
# 启动文件整理线程
|
||||
self._transfer_thread = threading.Thread(target=self.__start_transfer)
|
||||
self._transfer_thread = threading.Thread(target=self.__start_transfer, daemon=True)
|
||||
self._transfer_thread.start()
|
||||
|
||||
# 读取目录配置
|
||||
|
||||
Reference in New Issue
Block a user