mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 10:42:39 +00:00
Properly close PGVector DB connection during shutdown()
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
ccf0cbb903
commit
3444b32091
1 changed files with 3 additions and 1 deletions
|
@ -158,7 +158,9 @@ class PGVectorVectorDBAdapter(VectorIO, VectorDBsProtocolPrivate):
|
|||
raise RuntimeError("Could not connect to PGVector database server") from e
|
||||
|
||||
async def shutdown(self) -> None:
|
||||
pass
|
||||
if self.conn is not None:
|
||||
self.conn.close()
|
||||
log.info("Connection to PGVector database server closed")
|
||||
|
||||
async def register_vector_db(self, vector_db: VectorDB) -> None:
|
||||
upsert_models(self.cursor, [(vector_db.identifier, vector_db)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue