File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def init_tcp_connection_engine(db_config):
83
83
drivername = "postgres+pg8000" ,
84
84
username = db_user , # e.g. "my-database-user"
85
85
password = db_pass , # e.g. "my-database-password"
86
- host = db_host , # e.g. "127.0.0.1"
86
+ host = db_hostname , # e.g. "127.0.0.1"
87
87
port = db_port , # e.g. 5432
88
88
database = db_name # e.g. "my-database-name"
89
89
),
Original file line number Diff line number Diff line change @@ -38,10 +38,11 @@ def init_tcp_connection_engine():
38
38
db_user = os .environ ["DB_USER" ]
39
39
db_pass = os .environ ["DB_PASS" ]
40
40
db_name = os .environ ["DB_NAME" ]
41
+ db_host = os .environ ["DB_HOST" ]
41
42
42
43
# Extract host and port from environment variable DB_HOST
43
- host_args = os . environ [ "DB_HOST" ] .split (":" )
44
- host , port = host_args [0 ], int (host_args [1 ])
44
+ host_args = db_host .split (":" )
45
+ db_hostname , db_port = host_args [0 ], int (host_args [1 ])
45
46
46
47
# The SQLAlchemy engine will help manage interactions, including automatically
47
48
# managing a pool of connections to your database
@@ -53,8 +54,8 @@ def init_tcp_connection_engine():
53
54
username = db_user ,
54
55
password = db_pass ,
55
56
database = db_name ,
56
- host = host ,
57
- port = port ,
57
+ host = db_hostname ,
58
+ port = db_port ,
58
59
query = {"driver" : "ODBC Driver 17 for SQL Server" },
59
60
),
60
61
# ... Specify additional properties here.
You can’t perform that action at this time.
0 commit comments