From aca994f29ce0271a4f02350fbb35eefeda2a15a3 Mon Sep 17 00:00:00 2001 From: robcxyz Date: Tue, 31 Oct 2023 10:40:04 +0800 Subject: [PATCH] chore: fix connection string --- icon_stats/db.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/icon_stats/db.py b/icon_stats/db.py index 24d391a..b12ff15 100644 --- a/icon_stats/db.py +++ b/icon_stats/db.py @@ -18,14 +18,7 @@ def create_conn_str( return f"{prefix}://{user}:{password}@{server}:{port}/{database}" -# ASYNC_SQLALCHEMY_DATABASE_URL = create_conn_str(**config.db.stats.__dict__) -ASYNC_CONNECTION_STRING = create_conn_str( - user="postgres", - password="changeme", - server="localhost", - database="postgres", - port="5432", -) +ASYNC_CONNECTION_STRING = create_conn_str(**config.db.stats.__dict__) def create_db_connection_strings() -> dict[str, str]: @@ -44,7 +37,6 @@ def create_session_factories() -> dict[str, async_sessionmaker]: connection_string = create_conn_str(**db_config.__dict__) engine = create_async_engine( connection_string, - # connect_args={"options": f"-c search_path={db_config.schema_}"}, echo=True, future=True, )