File tree Expand file tree Collapse file tree 2 files changed +5
-108
lines changed
Expand file tree Collapse file tree 2 files changed +5
-108
lines changed Original file line number Diff line number Diff line change @@ -161,13 +161,15 @@ async def _check_svs_vamana_requirements(
161161 return warnings
162162
163163 # Check Redis version support
164+ created_client = False
164165 try :
165166 if redis_client :
166167 client = redis_client
167168 elif redis_url :
168169 from redis .asyncio import Redis
169170
170171 client = Redis .from_url (redis_url )
172+ created_client = True
171173 else :
172174 client = None
173175
@@ -182,6 +184,9 @@ async def _check_svs_vamana_requirements(
182184 "SVS-VAMANA requires Redis >= 8.2.0 and Redis Search >= 2.8.10. "
183185 "Verify your Redis instance supports this algorithm before applying."
184186 )
187+ finally :
188+ if created_client and client is not None :
189+ await client .aclose () # type: ignore[union-attr]
185190
186191 # Intel hardware warning for compression
187192 if uses_compression :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments