mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
fix: Pass all parsed options to ReconnectingPostgresqlDatabase
This commit is contained in:
parent
8d257ed596
commit
a53c2a8c6b
@ -54,13 +54,7 @@ def register_connection(db_url):
|
|||||||
connection = parse(db_url)
|
connection = parse(db_url)
|
||||||
|
|
||||||
# Use our custom database class that supports reconnection
|
# Use our custom database class that supports reconnection
|
||||||
db = ReconnectingPostgresqlDatabase(
|
db = ReconnectingPostgresqlDatabase(**connection)
|
||||||
connection["database"],
|
|
||||||
user=connection["user"],
|
|
||||||
password=connection["password"],
|
|
||||||
host=connection["host"],
|
|
||||||
port=connection["port"],
|
|
||||||
)
|
|
||||||
db.connect(reuse_if_open=True)
|
db.connect(reuse_if_open=True)
|
||||||
elif isinstance(db, SqliteDatabase):
|
elif isinstance(db, SqliteDatabase):
|
||||||
# Enable autoconnect for SQLite databases, managed by Peewee
|
# Enable autoconnect for SQLite databases, managed by Peewee
|
||||||
|
Loading…
Reference in New Issue
Block a user