fix(fulfillment): 清理重新绑定后的旧失败状态

This commit is contained in:
yml
2026-11-18 10:59:20 +08:00
parent 99c96974f2
commit 3a8f12ae43
2 changed files with 71 additions and 0 deletions
@@ -970,6 +970,8 @@ async def start_binding(
task.bind_task_id = bind_task.id
task.binding_status = "preparing"
task.execution_status = "waiting_bind"
task.issue_code = ""
task.last_error = ""
task.operator_id = current.id
task.updated_at = _now()
renew_lease(
@@ -1021,6 +1023,8 @@ def refresh_binding(db: Session, *, task_id: int) -> dict[str, Any]:
elif result.get("url"):
task.binding_status = "qr_pending"
task.execution_status = "waiting_bind"
task.issue_code = ""
task.last_error = ""
task.updated_at = _now()
db.commit()
return get_task_detail(db, task.id)