Fix: the output log is incorrect (#8577)

### What problem does this PR solve?

Fix: the output log is incorrect

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: liang <xiaofeng.liang@landstech.com.cn>
This commit is contained in:
symvation
2025-07-01 10:49:43 +08:00
committed by GitHub
parent d4da6dce6e
commit 32f8b3ad77
2 changed files with 6 additions and 6 deletions

View File

@ -254,7 +254,7 @@ class ESConnection(DocStoreConnection):
if str(e).find("Timeout") > 0:
continue
raise e
logger.error("ESConnection.search timeout for 3 times!")
logger.error(f"ESConnection.search timeout for {ATTEMPT_TIME} times!")
raise Exception("ESConnection.search timeout.")
def get(self, chunkId: str, indexName: str, knowledgebaseIds: list[str]) -> dict | None:
@ -274,7 +274,7 @@ class ESConnection(DocStoreConnection):
if str(e).find("Timeout") > 0:
continue
raise e
logger.error("ESConnection.get timeout for 3 times!")
logger.error(f"ESConnection.get timeout for {ATTEMPT_TIME} times!")
raise Exception("ESConnection.get timeout.")
def insert(self, documents: list[dict], indexName: str, knowledgebaseId: str = None) -> list[str]:
@ -562,5 +562,5 @@ class ESConnection(DocStoreConnection):
except Exception:
logger.exception("ESConnection.sql got exception")
return None
logger.error("ESConnection.sql timeout for 3 times!")
logger.error(f"ESConnection.sql timeout for {ATTEMPT_TIME} times!")
return None