Skip to content

Commit

Permalink
Disconnect when deleted. (run-llama#13611)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkyh authored and Mateusz-Switala committed Jun 13, 2024
1 parent e0b9c12 commit 41577c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def __init__(
name=collection_name, dimension=dimension
)

def __del__(self) -> None:
"""Close the client when the object is deleted."""
if self._client is not None:
self._client.disconnect()

@property
def client(self) -> None:
"""Get client."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT"
name = "llama-index-vector-stores-supabase"
readme = "README.md"
version = "0.1.3"
version = "0.1.4"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
Expand Down

0 comments on commit 41577c2

Please sign in to comment.