mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-15 06:53:12 +00:00
fix:sync status idempotent
when RUNNING AND FINISHED cannot sync
This commit is contained in:
parent
73b1863c69
commit
d96000ef35
@ -116,7 +116,7 @@ class KnowledgeService:
|
||||
)
|
||||
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.doc_name} can not sync")
|
||||
raise Exception(f" doc:{doc.doc_name} status is {doc.status}, can not sync")
|
||||
client = KnowledgeEmbedding(
|
||||
knowledge_source=doc.content,
|
||||
knowledge_type=doc.doc_type.upper(),
|
||||
|
Loading…
Reference in New Issue
Block a user