Skip to content

Commit adff2c2

Browse files
committed
feat(db): Enforce Chroma v0 client version
1 parent 7751f71 commit adff2c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vectorcode/database/chroma0.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ async def get_client(self, configs: Config, need_lock: bool = True):
190190
lock = LockManager().get_lock(str(db_path))
191191
_logger.debug(f"Locking {db_path}")
192192
await lock.acquire()
193-
yield self.__clients[project_root].client
193+
194+
new_client = self.__clients[project_root].client
195+
assert (await new_client.get_version()).split(".")[0] == "0"
196+
yield new_client
197+
194198
if lock is not None:
195199
_logger.debug(f"Unlocking {db_log_path}")
196200
await lock.release()

0 commit comments

Comments
 (0)