feat: 设置psycopg2 超时时间

This commit is contained in:
caoqianming 2025-06-19 15:18:22 +08:00
parent c4a5df07b2
commit 89cf6ccc91
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ def get_cbma_info_from_db_and_ana(year: str = '2023'):
df_web = None
try:
conn_web = psycopg2.connect(
"dbname={} user={} password={} host={} port={}".format('edn_cms', 'auditor', 'Lde78B3_cbma', '10.65.253.10', '54321'))
"dbname={} user={} password={} host={} port={}".format('edn_cms', 'auditor', 'Lde78B3_cbma', '10.65.253.10', '54321'), connect_timeout=2)
query_web = f"""
SELECT
a_outer.id,