mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 05:55:59 +08:00
Update progress time info (#4193)
### What problem does this PR solve? Ignore the millisecond and microsecond value. ### Type of change - [x] Refactoring Signed-off-by: jinhai <haijin.chn@gmail.com>
This commit is contained in:
parent
a9fd6066d2
commit
d030b4a680
@ -85,7 +85,7 @@ class TaskService(CommonService):
|
||||
if not docs:
|
||||
return None
|
||||
|
||||
msg = f"\n{datetime.now().strftime('%H:%M:%S.%f')} Task has been received."
|
||||
msg = f"\n{datetime.now().strftime('%H:%M:%S')} Task has been received."
|
||||
prog = random.random() / 10.0
|
||||
if docs[0]["retry_count"] >= 3:
|
||||
msg = "\nERROR: Task is abandoned after 3 times attempts."
|
||||
|
@ -117,7 +117,7 @@ def set_progress(task_id, from_page=0, to_page=-1, prog=None, msg="Processing...
|
||||
if msg:
|
||||
msg = f"Page({from_page + 1}~{to_page + 1}): " + msg
|
||||
if msg:
|
||||
msg = datetime.now().strftime("%H:%M:%S.%f") + " " + msg
|
||||
msg = datetime.now().strftime("%H:%M:%S") + " " + msg
|
||||
d = {"progress_msg": msg}
|
||||
if prog is not None:
|
||||
d["progress"] = prog
|
||||
|
Loading…
x
Reference in New Issue
Block a user