From 894e53caefa5335e203dfcd5fff551f84d03e8cc Mon Sep 17 00:00:00 2001 From: Yuzhiran Dev Date: Mon, 18 May 2026 22:41:31 +0800 Subject: [PATCH] Add intermediate progress update for running tasks --- platform/backend/app/api/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/backend/app/api/tasks.py b/platform/backend/app/api/tasks.py index f148e09..dc20edf 100644 --- a/platform/backend/app/api/tasks.py +++ b/platform/backend/app/api/tasks.py @@ -231,6 +231,11 @@ def run_creator_task( from datetime import datetime, timezone new_db = SessionLocal() try: + new_task = new_db.query(ContentTask).filter(ContentTask.task_id == task_id).first() + if new_task: + new_task.message = "创作脚本运行中..." + new_task.progress = 30 + new_db.commit() result = run_creator(topic_id) new_task = new_db.query(ContentTask).filter(ContentTask.task_id == task_id).first() if new_task: