Revert "Refa: make RAGFlow more asynchronous 2 (#11664)"

This reverts commit 627c11c429.
This commit is contained in:
Kevin Hu
2025-12-02 19:34:56 +08:00
committed by GitHub
parent 962bd5f5df
commit cd0216cce3
14 changed files with 292 additions and 622 deletions

View File

@ -719,14 +719,10 @@ class DocumentService(CommonService):
# only for special task and parsed docs and unfinished
freeze_progress = special_task_running and doc_progress >= 1 and not finished
msg = "\n".join(sorted(msg))
begin_at = d.get("process_begin_at")
if not begin_at:
begin_at = datetime.now()
# fallback
cls.update_by_id(d["id"], {"process_begin_at": begin_at})
info = {
"process_duration": max(datetime.timestamp(datetime.now()) - begin_at.timestamp(), 0),
"process_duration": datetime.timestamp(
datetime.now()) -
d["process_begin_at"].timestamp(),
"run": status}
if prg != 0 and not freeze_progress:
info["progress"] = prg