feat(core): 添加调度队列完成任务后行为选项

This commit is contained in:
DLmaster
2025-02-06 23:33:00 +08:00
parent fb7a429ff2
commit 7f5478b098
11 changed files with 127 additions and 78 deletions

View File

@@ -539,13 +539,6 @@ class MaaManager(QObject):
f"{self.mode[:4]}任务报告",
f"{end_log}AUTO_MAA 敬上",
)
if Config.global_config.function_AutoShutdown:
logger.info("任务完成,系统将在 60 秒后自动关机...")
if sys.platform.startswith("win"):
subprocess.run("shutdown /s /t 60", shell=True) # Windows
else:
# 看到 Issues 里有兼容 Linux 的计划,加上 Linux 的
subprocess.run("shutdown -h +1", shell=True) # Linux/macOS
self.accomplish.emit({"Time": begin_time, "History": end_log})