mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-06 10:54:29 +00:00
fix:sync status idempotent
when RUNNING AND FINISHED cannot sync
This commit is contained in:
parent
7ad629eb3d
commit
f29a0a2472
@ -115,6 +115,8 @@ class KnowledgeService:
|
||||
space=space_name,
|
||||
)
|
||||
doc = knowledge_document_dao.get_knowledge_documents(query)[0]
|
||||
if doc.status == SyncStatus.RUNNING.name or doc.status == SyncStatus.FINISHED.name:
|
||||
raise Exception(f"RUNNING AND FINISHED doc:{doc.name} can not sync")
|
||||
client = KnowledgeEmbedding(
|
||||
knowledge_source=doc.content,
|
||||
knowledge_type=doc.doc_type.upper(),
|
||||
|
Loading…
Reference in New Issue
Block a user