diff --git a/apps/api/src/api/v1/webhooks.py b/apps/api/src/api/v1/webhooks.py index e9d23ae4..d099f7d4 100644 --- a/apps/api/src/api/v1/webhooks.py +++ b/apps/api/src/api/v1/webhooks.py @@ -309,6 +309,20 @@ async def _try_auto_repair_background( # 記錄執行結果 if result: + try: + await get_approval_service().update_execution_status( + approval_id=approval_id, + success=result.success, + error_message=result.error, + ) + except Exception as _approval_status_err: + logger.warning( + "auto_repair_approval_status_update_failed", + approval_id=approval_id, + incident_id=incident_id, + error=str(_approval_status_err), + ) + await op_log.append( "EXECUTION_COMPLETED", incident_id=incident_id,