From d3ffc4b51486a39dcda058058cbe9ffe34539c76 Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Fri, 24 May 2024 14:02:55 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/run.py b/app/run.py index d48e15c..59a3903 100644 --- a/app/run.py +++ b/app/run.py @@ -168,7 +168,7 @@ def run_script_now(): return "未登录" task_index = request.args.get("task_index", "") command = [PYTHON_PATH, "-u", SCRIPT_PATH, CONFIG_PATH, task_index] - logging.info(f">>> 手动运行任务{task_index}") + logging.info(f">>> 手动运行任务{task_index+1}") def generate_output(): process = subprocess.Popen( @@ -180,7 +180,7 @@ def run_script_now(): ) try: for line in iter(process.stdout.readline, ""): - logging.info(line) + logging.info(line.strip()) yield f"data: {line}\n\n" yield "data: [DONE]\n\n" finally: