forked from phoenix-oss/llama-stack-mirror
Properly close PGVector DB connection during shutdown() (#931)
The connection to the DB was not closed during shutdown. Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
ccf0cbb903
commit
83a51c7bfb
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