mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-05 09:47:47 +08:00
Fix (api): fix the document parsing status check logic (#12504)
### What problem does this PR solve? When the original code terminates the parsing task halfway, the progress may not be 0 or 1, which will result in the inability to call the interface to parse again -Change the document parsing progress check to task status check, and use TaskStatus.RUNNING.value to judge -Update the condition judgment for stopping parsing documents, and check whether the task is running instead ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -157,7 +157,7 @@ class TestDocumentsParseStop:
|
||||
|
||||
res = stop_parse_documents(HttpApiAuth, dataset_id, {"document_ids": document_ids})
|
||||
assert res["code"] == 102
|
||||
assert res["message"] == "Can't stop parsing document with progress at 0 or 1"
|
||||
assert res["message"] == "Can't stop parsing document that has not started or already completed"
|
||||
|
||||
@pytest.mark.p3
|
||||
def test_duplicate_stop_parse(self, HttpApiAuth, add_documents_func):
|
||||
|
||||
Reference in New Issue
Block a user