We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fd459c commit 2381b17Copy full SHA for 2381b17
1 file changed
src/backend/bisheng/channel/domain/services/article_es_service.py
@@ -40,8 +40,9 @@ async def _get_client(self) -> AsyncElasticsearch:
40
41
async def ensure_index(self) -> None:
42
"""Ensure article index exists"""
43
- client = await self._get_client()
44
- await ensure_article_index_exists(client)
+ if self._es_client is None:
+ self._es_client = await get_es_connection()
45
+ await ensure_article_index_exists(self._es_client)
46
47
@staticmethod
48
def ensure_index_sync() -> None:
0 commit comments