fix(fulfillment): 清理重新绑定后的旧失败状态
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user