fixed typo
This commit is contained in:
@@ -493,15 +493,14 @@ class LightRAG:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 3. Filter out already processed documents
|
# 3. Filter out already processed documents
|
||||||
new_doc_keys: set[str] = set()
|
|
||||||
# Get docs ids
|
# Get docs ids
|
||||||
in_process_keys = set(new_docs.keys())
|
all_new_doc_ids = set(new_docs.keys())
|
||||||
# Get in progress docs ids
|
# Retrieve IDs that are already being processed
|
||||||
excluded_ids = await self.doc_status.filter_keys(list(in_process_keys))
|
existing_ids = await self.doc_status.filter_keys(all_new_doc_ids)
|
||||||
# Exclude already in process
|
# Exclude IDs of documents that are already in progress
|
||||||
new_doc_keys = in_process_keys - excluded_ids
|
unique_new_doc_ids = all_new_doc_ids - existing_ids
|
||||||
# Filter
|
# Filter new_docs to only include documents with unique IDs
|
||||||
new_docs = {doc_id: new_docs[doc_id] for doc_id in new_doc_keys}
|
new_docs = {doc_id: new_docs[doc_id] for doc_id in unique_new_doc_ids}
|
||||||
|
|
||||||
if not new_docs:
|
if not new_docs:
|
||||||
logger.info("All documents have been processed or are duplicates")
|
logger.info("All documents have been processed or are duplicates")
|
||||||
|
Reference in New Issue
Block a user