Skip to content

Commit

Permalink
revert closing
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-valente committed Apr 10, 2024
1 parent d5f6474 commit e2f4d6a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions chromadb/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,6 @@ def close(self) -> None:

# endregion

@override
def __del__(self) -> None:
# only enforce resource clean-up for ephemeral clients - expand to others?
if self._identifier == "ephemeral":
self.close()
super().__del__()


class AdminClient(SharedSystemClient, AdminAPI):
_server: ServerAPI
Expand Down
1 change: 1 addition & 0 deletions chromadb/test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def test_delete_ephemeral_client() -> None:
client = chromadb.EphemeralClient()
coll = client.get_or_create_collection("test")
coll.add(ids="1", documents="a", embeddings=[1] * 128)
client.close()
del client

client = chromadb.EphemeralClient()
Expand Down

0 comments on commit e2f4d6a

Please sign in to comment.