Fix: wrong chunk number while re-parsing document and keeping original chunks (#9912)
### What problem does this PR solve? Fix wrong chunk number while re-parsing document and keeping original chunks ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
parent
aa1251af9a
commit
abd19b0f48
1 changed files with 2 additions and 3 deletions
|
|
@ -456,8 +456,7 @@ def run():
|
||||||
cancel_all_task_of(id)
|
cancel_all_task_of(id)
|
||||||
else:
|
else:
|
||||||
return get_data_error_result(message="Cannot cancel a task that is not in RUNNING status")
|
return get_data_error_result(message="Cannot cancel a task that is not in RUNNING status")
|
||||||
|
if all([("delete" not in req or req["delete"]), str(req["run"]) == TaskStatus.RUNNING.value, str(doc.run) == TaskStatus.DONE.value]):
|
||||||
if str(req["run"]) == TaskStatus.RUNNING.value and str(doc.run) == TaskStatus.DONE.value:
|
|
||||||
DocumentService.clear_chunk_num_when_rerun(doc.id)
|
DocumentService.clear_chunk_num_when_rerun(doc.id)
|
||||||
|
|
||||||
DocumentService.update_by_id(id, info)
|
DocumentService.update_by_id(id, info)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue