fix(douyu): 补齐成功后刷新和精英宝典批量选择
This commit is contained in:
@@ -174,6 +174,23 @@ class ManualMixin:
|
||||
result["payment_polling"] = False
|
||||
result["elite_opened"] = True
|
||||
account.elite_opened = True
|
||||
# 到账判定本身已经调用过积分接口;成功后再收口一次,确保任务结果
|
||||
# 和账号积分反映的是开通完成后的最终值。
|
||||
try:
|
||||
final_points = self._refresh_account_points(
|
||||
client, account, cookie, ctn=ctn
|
||||
)
|
||||
result.update(final_points)
|
||||
result["points_refreshed_after_elite_opened"] = True
|
||||
self._push_log(
|
||||
"info",
|
||||
"精英宝典开通成功,已刷新积分: "
|
||||
f"{account.points if account.points is not None else '-'}",
|
||||
)
|
||||
except Exception as exc: # noqa: BLE001 开通成功后刷新失败不翻盘
|
||||
result["points_refreshed_after_elite_opened"] = False
|
||||
result["elite_open_points_refresh_error"] = str(exc)
|
||||
self._push_log("warning", f"精英宝典开通后刷新积分失败: {exc}")
|
||||
account.updated_at = datetime.now(UTC)
|
||||
spent = _points_spent(baseline_points, account.points)
|
||||
emit(
|
||||
|
||||
Reference in New Issue
Block a user