Skip to content

Commit f11c53f

Browse files
committed
fix: When importing documents from a web knowledge base, if a failed document is encountered, the import will be interrupted
1 parent 96ab89a commit f11c53f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/dataset/task/sync.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,8 @@ def sync_replace_web_dataset(dataset_id: str, url: str, selector: str):
5454
def sync_web_document(dataset_id, source_url_list: List[str], selector: str):
5555
handler = get_sync_web_document_handler(dataset_id)
5656
for source_url in source_url_list:
57-
result = Fork(base_fork_url=source_url, selector_list=selector.split(' ')).fork()
58-
handler(source_url, selector, result)
57+
try:
58+
result = Fork(base_fork_url=source_url, selector_list=selector.split(' ')).fork()
59+
handler(source_url, selector, result)
60+
except Exception as e:
61+
pass

0 commit comments

Comments
 (0)