From fd444b4cb40722b32993a287af9793243b044b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chu?= <812791840@qq.com> Date: Mon, 1 Dec 2025 16:48:44 +0800 Subject: [PATCH] Update sync_data_source.py --- rag/svr/sync_data_source.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rag/svr/sync_data_source.py b/rag/svr/sync_data_source.py index a5c4c4cfb..fbe3722d5 100644 --- a/rag/svr/sync_data_source.py +++ b/rag/svr/sync_data_source.py @@ -112,7 +112,7 @@ class SyncBase: failed_docs += len(docs) continue - prefix = "[Jira] " if self.SOURCE_NAME == FileSource.JIRA else "" + prefix = self._get_source_prefix() if failed_docs > 0: logging.info(f"{prefix}{doc_num} docs synchronized till {next_update} ({failed_docs} skipped)") else: @@ -128,6 +128,9 @@ class SyncBase: async def _generate(self, task: dict): raise NotImplementedError + + def _get_source_prefix(self): + return "" class S3(SyncBase): @@ -402,6 +405,9 @@ class GoogleDrive(SyncBase): class Jira(SyncBase): SOURCE_NAME: str = FileSource.JIRA + def _get_source_prefix(self): + return "[Jira]" + async def _generate(self, task: dict): connector_kwargs = { "jira_base_url": self.conf["base_url"],