From 49bd4b31d3e041a7d199297fe08134d70c254356 Mon Sep 17 00:00:00 2001 From: egg Date: Wed, 25 Feb 2026 13:16:41 +0800 Subject: [PATCH] fix(mid-section-defect): use read_sql_df_slow to avoid 55s pool timeout Station detection query with large date ranges (5+ months) exceeds the 55s pool call_timeout. Switch to read_sql_df_slow (300s, dedicated connection) matching other historical query services. Co-Authored-By: Claude Opus 4.6 --- src/mes_dashboard/services/mid_section_defect_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mes_dashboard/services/mid_section_defect_service.py b/src/mes_dashboard/services/mid_section_defect_service.py index 6c82e48..cc86aee 100644 --- a/src/mes_dashboard/services/mid_section_defect_service.py +++ b/src/mes_dashboard/services/mid_section_defect_service.py @@ -46,7 +46,7 @@ from typing import Optional, Dict, List, Any, Set, Tuple, Generator import pandas as pd -from mes_dashboard.core.database import read_sql_df +from mes_dashboard.core.database import read_sql_df_slow as read_sql_df from mes_dashboard.core.cache import cache_get, cache_set, make_cache_key from mes_dashboard.core.redis_client import try_acquire_lock, release_lock from mes_dashboard.sql import SQLLoader