From 63d9e00a1e21f376fc7da3829fc92043626ff59e Mon Sep 17 00:00:00 2001 From: ymq Date: Thu, 3 Sep 2026 12:44:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B1=81=E5=85=8D=E5=88=86=E6=94=AF?= =?UTF-8?q?=E5=85=88COMMIT=E8=AE=A4=E9=A2=86=E5=86=8D=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E2=80=94=E2=80=94=5Fclaim=5Ftask=E7=9A=84UPDATE=E6=9C=AA?= =?UTF-8?q?=E6=8F=90=E4=BA=A4,=E5=8F=A6=E4=B8=80=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=8C=E4=B8=80=E8=A1=8C=E9=94=81=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E8=B6=85=E6=97=B61205(=E5=AE=9E=E6=B5=8B=E8=B1=81?= =?UTF-8?q?=E5=85=8D=E8=B7=AF=E5=BE=8450=E7=A7=92=E5=8D=A1=E6=AD=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/agent_loop.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index ec7402b..374a3d4 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -2778,6 +2778,12 @@ async def pm_review_run(project_id, agent_id=None, model_name=None): except Exception: pass if _skip_gqc: + # 先提交认领(_claim_task 的 UPDATE 在本连接未提交), + # 否则 approve_task 在另一连接更新同一行会等自己的锁超时(1205)。 + try: + await sor.sqlExe("COMMIT", {}) + except Exception: + pass from .task_capability import approve_task await approve_task(task_id, project_id, who="agent.pm", agent_id=agent_id, comment="产线自带质量门禁,PM 豁免内容复审") @@ -3118,6 +3124,12 @@ async def qc_review_run(project_id, agent_id=None, model_name=None): # 的任务直接放行,避免被当「交付件合规检查」反复拒回烧轮次。 # task_kind=bid_* 兜底覆盖改造前创建的存量任务(params 里没有豁免标记)。 if skip_generic_qc or task_kind.startswith("bid_"): + # 先提交认领(_claim_task 的 UPDATE 在本连接未提交), + # 否则 qc_exempt_task 在另一连接更新同一行会等自己的锁超时(1205)。 + try: + await sor.sqlExe("COMMIT", {}) + except Exception: + pass from .task_capability import qc_exempt_task await qc_exempt_task(task_id, project_id, who="agent.qc", agent_id=agent_id, comment="产线自带质量门禁,豁免通用QC(skip_generic_qc/bid_*)")