mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-15 17:00:43 +08:00
🎨 控制台日志优化
This commit is contained in:
parent
46bec2331c
commit
d3ffc4b514
@ -168,7 +168,7 @@ def run_script_now():
|
|||||||
return "未登录"
|
return "未登录"
|
||||||
task_index = request.args.get("task_index", "")
|
task_index = request.args.get("task_index", "")
|
||||||
command = [PYTHON_PATH, "-u", SCRIPT_PATH, CONFIG_PATH, 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():
|
def generate_output():
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
@ -180,7 +180,7 @@ def run_script_now():
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
for line in iter(process.stdout.readline, ""):
|
for line in iter(process.stdout.readline, ""):
|
||||||
logging.info(line)
|
logging.info(line.strip())
|
||||||
yield f"data: {line}\n\n"
|
yield f"data: {line}\n\n"
|
||||||
yield "data: [DONE]\n\n"
|
yield "data: [DONE]\n\n"
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user