File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
redisvl/extensions/llmcache Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,14 @@ def _modify_schema(
186186 async def _get_async_index (self ) -> AsyncSearchIndex :
187187 """Lazily construct the async search index class."""
188188 # Construct async index if necessary
189- if not self ._aindex :
189+ async_client = None
190+ if self ._aindex is None :
190191 client = self .redis_kwargs .get ("redis_client" )
191- if client and isinstance (client , Redis ):
192- client = RedisConnectionFactory .sync_to_async_redis (client )
192+ if isinstance (client , Redis ):
193+ async_client = RedisConnectionFactory .sync_to_async_redis (client )
193194 self ._aindex = AsyncSearchIndex (
194195 schema = self ._index .schema ,
195- redis_client = client ,
196+ redis_client = async_client ,
196197 redis_url = self .redis_kwargs ["redis_url" ],
197198 ** self .redis_kwargs ["connection_kwargs" ],
198199 )
You can’t perform that action at this time.
0 commit comments