risk: polish retry coverage and refresh failure summary
All checks were successful
Gitea CI / test (push) Successful in 32s
Gitea CI / test (pull_request) Successful in 31s

This commit is contained in:
agentson
2026-03-02 09:44:24 +09:00
parent ba2370e40e
commit b34937ea9d
3 changed files with 33 additions and 3 deletions

View File

@@ -1375,7 +1375,10 @@ async def _cancel_pending_orders_for_kill_switch(
)
if failures:
raise RuntimeError("; ".join(failures[:3]))
summary = "; ".join(failures[:3])
if len(failures) > 3:
summary = f"{summary} (+{len(failures) - 3} more)"
raise RuntimeError(summary)
async def _refresh_order_state_for_kill_switch(
@@ -1402,7 +1405,10 @@ async def _refresh_order_state_for_kill_switch(
)
failures.append(f"{market.code}/{market.exchange_code}: {exc}")
if failures:
raise RuntimeError("; ".join(failures[:3]))
summary = "; ".join(failures[:3])
if len(failures) > 3:
summary = f"{summary} (+{len(failures) - 3} more)"
raise RuntimeError(summary)
def _reduce_risk_for_kill_switch() -> None: