Add PACKAGE_LEF as a dedicated `package` field in the QC-GATE API payload and display it as a new column after LOT ID in LotTable.vue. Archive qc-gate-lot-package-column, historical-query-slow-connection, and msd-multifactor-backward-tracing changes with their delta specs synced to main specs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
1. Core Infrastructure
- 1.1 Add
DB_SLOW_CALL_TIMEOUT_MS(default 300000) andDB_SLOW_MAX_CONCURRENT(default 3) to all config classes insettings.py(Config, DevelopmentConfig=2, ProductionConfig=3, TestingConfig=1/10000) - 1.2 Update
get_db_runtime_config()indatabase.pyto includeslow_call_timeout_msandslow_max_concurrent - 1.3 Add module-level
threading.Semaphore, active count tracking, andget_slow_query_active_count()indatabase.py - 1.4 Refactor
read_sql_df_slow(): defaulttimeout_seconds=None(reads from config), acquire/release semaphore, log active count - 1.5 Update
dispose_engine()to reset semaphore; addslow_query_activetoget_pool_status() - 1.6 Increase Gunicorn timeout to 360s and graceful_timeout to 120s in
gunicorn.conf.py
2. Backend Service Migration
- 2.1
reject_history_service.py: change import toread_sql_df_slow as read_sql_df - 2.2
reject_dataset_cache.py: change import toread_sql_df_slow as read_sql_df - 2.3
hold_history_service.py: change import toread_sql_df_slow as read_sql_df(keep DatabaseCircuitOpenError/DatabasePoolExhaustedError imports) - 2.4
resource_history_service.py: change import toread_sql_df_slow as read_sql_df - 2.5
job_query_service.py: change import toread_sql_df_slow as read_sql_df(keepget_db_connectionimport) - 2.6
excel_query_service.py: setconnection.call_timeout = runtime["slow_call_timeout_ms"]on direct connections inexecute_batch_queryandexecute_advanced_batch_query - 2.7
query_tool_service.py: remove hardcodedtimeout_seconds=120fromread_sql_df_slowcall (line 1131)
3. Frontend Timeout Updates
- 3.1
reject-history/App.vue:API_TIMEOUT60000 → 360000 - 3.2
mid-section-defect/App.vue:API_TIMEOUT120000 → 360000 - 3.3
hold-history/App.vue:API_TIMEOUT60000 → 360000 - 3.4
resource-history/App.vue:API_TIMEOUT60000 → 360000 - 3.5
shared-composables/useTraceProgress.js:DEFAULT_STAGE_TIMEOUT_MS60000 → 360000 - 3.6
job-query/composables/useJobQueryData.js: alltimeout: 60000→ 360000 (3 sites) - 3.7
excel-query/composables/useExcelQueryData.js:timeout: 120000→ 360000 (2 sites, lines 135, 255) - 3.8
query-tool/composables/useLotDetail.js:timeout: 120000→ 360000 (3 sites) andtimeout: 60000→ 360000 (1 site) - 3.9
query-tool/composables/useEquipmentQuery.js:timeout: 120000→ 360000 andtimeout: 60000→ 360000 - 3.10
query-tool/composables/useLotResolve.js:timeout: 60000→ 360000 - 3.11
query-tool/composables/useLotLineage.js:timeout: 60000→ 360000 - 3.12
query-tool/composables/useReverseLineage.js:timeout: 60000→ 360000 - 3.13
query-tool/components/LotJobsTable.vue:timeout: 60000→ 360000
4. Verification
- 4.1 Run
python -m pytest tests/ -v— all existing tests pass (28 pre-existing failures, 1076 passed, 0 new failures) - 4.2 Run
cd frontend && npm run build— frontend builds successfully