修复(履约重试): 绑定失败无账号任务允许重新选号

- prepare_manual_allocation 支持 binding_failed/lease_expired 的人工重新选号
- 客户刷新时把任务重置为 ready 并唤醒选号
- 保留客户资料,分配成功后继续启动绑定
- 补充重试测试
This commit is contained in:
yml
2026-11-25 14:04:50 +08:00
parent 18df3443d8
commit eab1d1937a
3 changed files with 67 additions and 0 deletions
@@ -131,6 +131,18 @@ async def customer_start_binding(
raise HTTPException(status_code=409, detail="请先提交游戏角色和游戏主页截图")
if not task.account_id or not task.lease_id:
if (
task.execution_status == "manual_required"
and task.issue_code in {"binding_failed", "lease_expired"}
):
from .allocation import prepare_manual_allocation
prepare_manual_allocation(
db,
task_id=task.id,
current=_integration_actor(db),
)
db.commit()
from .auto_allocator import wake_auto_allocator
wake_auto_allocator([int(task.id)])