Update telegram bot implementation.
This commit is contained in:
@@ -805,6 +805,12 @@ class ProvisionerBot:
|
||||
self.current_team = None
|
||||
# 清理进度跟踪
|
||||
progress_finish()
|
||||
# 重置停止标志,以便下次任务可以正常运行
|
||||
try:
|
||||
import run
|
||||
run._shutdown_requested = False
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _run_team_task(self, team_idx: int):
|
||||
"""执行单个 Team 任务 (在线程池中运行)"""
|
||||
@@ -871,13 +877,8 @@ class ProvisionerBot:
|
||||
# 4. 重置状态
|
||||
self.current_team = None
|
||||
|
||||
# 5. 重置停止标志 (以便下次任务可以正常运行)
|
||||
try:
|
||||
import run
|
||||
run._shutdown_requested = False
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# 注意:不在这里重置 _shutdown_requested,让任务完成后在 _wrap_task 中重置
|
||||
# 这样可以确保线程池中的任务有足够时间检测到停止信号
|
||||
# 清理进度跟踪
|
||||
progress_finish()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user