mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-03 10:49:21 -05:00
refac/enh: db session sharing
This commit is contained in:
@@ -90,9 +90,9 @@ class PgvectorClient(VectorDBBase):
|
||||
|
||||
# if no pgvector uri, use the existing database connection
|
||||
if not PGVECTOR_DB_URL:
|
||||
from open_webui.internal.db import Session
|
||||
from open_webui.internal.db import ScopedSession
|
||||
|
||||
self.session = Session
|
||||
self.session = ScopedSession
|
||||
else:
|
||||
if isinstance(PGVECTOR_POOL_SIZE, int):
|
||||
if PGVECTOR_POOL_SIZE > 0:
|
||||
|
||||
Reference in New Issue
Block a user