F2-4b: rewrite 规则扩展 + item 改进 + 最终批量结果
- rewrite.py: 新增 _VAADIN_EXTRA_IMPORT_RE / _DSASP_CLIENT_IMPORT_RE / _ENVIROMENT_GET_IMPORT_RE 三条 import 剥离规则,统一在 5.9 清理节 运行;补多余引号修复(源数据 bug "...SQL 100"";") - run_batch_regression.py: connect_db 优先连本地 eip4dev:5433, 回退远程 192.168.20.68:5435 - output/rewritten/*.groovy: 规则重跑后的 rewritten 产物更新 - output/manual_workpackage/*.md: 对应工包重生成 - output/batch_regression_20260612_053253.json: 最终批跑结果 FULL_AUTO 94.1%(476/506);删除 3 个中间产物 JSON - docs/P1/F2-4批量回归报告.md: 最终通过率写入报告 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -123,14 +123,27 @@ def try_get_db_item(tid: str, db_conn) -> dict:
|
||||
|
||||
|
||||
def connect_db():
|
||||
"""F2-4b 修复:优先连接本地 eip4dev(5433),回退远程 192.168.20.68:5435。"""
|
||||
try:
|
||||
import psycopg2
|
||||
# 优先本地 eip4dev
|
||||
try:
|
||||
conn = psycopg2.connect(
|
||||
host="localhost", port=5433, dbname="eip4dev",
|
||||
user="eip4", password="", connect_timeout=5,
|
||||
options="-c search_path=eip3",
|
||||
)
|
||||
print(" 数据库连接成功(本地 eip4dev:5433),将抽取真实行数据作 item")
|
||||
return conn
|
||||
except Exception:
|
||||
pass
|
||||
# 回退远程
|
||||
conn = psycopg2.connect(
|
||||
host="192.168.20.68", port=5435, dbname="postgres",
|
||||
user="ceshi", password="ceshi", connect_timeout=5,
|
||||
options="-c search_path=eip3",
|
||||
)
|
||||
print(" 数据库连接成功,将抽取真实行数据作 item")
|
||||
print(" 数据库连接成功(远程 192.168.20.68:5435),将抽取真实行数据作 item")
|
||||
return conn
|
||||
except Exception as e:
|
||||
print(f" 数据库不可达 ({e}),item 将使用 {{}}")
|
||||
|
||||
Reference in New Issue
Block a user