From b83e632328a112800390666c93058464ffbbbe6e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sun, 24 Nov 2024 06:12:24 +0800 Subject: [PATCH] Update tool_task.py --- plugins/rsyncd/tool_task.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/rsyncd/tool_task.py b/plugins/rsyncd/tool_task.py index e57f9eb9e..e38a29626 100644 --- a/plugins/rsyncd/tool_task.py +++ b/plugins/rsyncd/tool_task.py @@ -42,7 +42,7 @@ def getTaskConf(): def getConfigData(): conf = getTaskConf() if os.path.exists(conf): - return json.loads(mw.readFile(getTaskConf())) + return json.loads(mw.readFile(conf)) return [] @@ -69,8 +69,7 @@ def createBgTaskByName(name, args): return True if "task_id" in cfg.keys() and cfg["task_id"] > 0: - res = mw.M("crontab").field("id, name").where( - "id=?", (cfg["task_id"],)).find() + res = mw.M("crontab").field("id, name").where("id=?", (cfg["task_id"],)).find() if res and res["id"] == cfg["task_id"]: print("计划任务已经存在!") return True