fix: 修复后端电源逻辑错误

This commit is contained in:
DLmaster361
2025-09-24 00:16:54 +08:00
parent 53d91fb3f8
commit 0f1cbfc82d

View File

@@ -323,10 +323,15 @@ class _TaskManager:
if mode == "自动代理" and task_id in Config.QueueConfig:
if Config.power_sign != "NoAction":
if Config.power_sign == "NoAction":
Config.power_sign = Config.QueueConfig[task_id].get(
"Info", "AfterAccomplish"
)
await Config.send_json(
WebSocketMessage(
id="Main", type="Update", data={"PowerSign": Config.power_sign}
).model_dump()
)
if len(self.task_dict) == 0 and Config.power_sign != "NoAction":
logger.info(f"所有任务已结束,准备执行电源操作: {Config.power_sign}")