Skip to content

Commit 34052ff

Browse files
authored
Disconnect when deleted. (#13611)
1 parent 343f944 commit 34052ff

File tree

2 files changed

+6
-1
lines changed
  • llama-index-integrations/vector_stores/llama-index-vector-stores-supabase

2 files changed

+6
-1
lines changed

llama-index-integrations/vector_stores/llama-index-vector-stores-supabase/llama_index/vector_stores/supabase/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ def __init__(
8181
name=collection_name, dimension=dimension
8282
)
8383

84+
def __del__(self) -> None:
85+
"""Close the client when the object is deleted."""
86+
if self._client is not None:
87+
self._client.disconnect()
88+
8489
@property
8590
def client(self) -> None:
8691
"""Get client."""

llama-index-integrations/vector_stores/llama-index-vector-stores-supabase/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
2727
license = "MIT"
2828
name = "llama-index-vector-stores-supabase"
2929
readme = "README.md"
30-
version = "0.1.3"
30+
version = "0.1.4"
3131

3232
[tool.poetry.dependencies]
3333
python = ">=3.8.1,<4.0"

0 commit comments

Comments
 (0)