mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-02 22:00:19 +00:00
- Add `_update_retry_interval()` helper in shared/common.sh to eliminate repeated backoff interval calculation and cap logic (was copied 10+ times across cloud provider API wrappers) - Refactor generic_cloud_api() to use new helper, reducing from 83 to 70 lines - Refactor scaleway_api() to use new helper, reducing from 66 to 53 lines - Refactor upcloud_api() to use new helper, reducing from 65 to 52 lines This reduces cyclomatic complexity by eliminating nested if statements for interval updates and consolidates the retry backoff logic in one place, making future maintenance easier and reducing bugs from copy-paste errors. Agent: complexity-hunter Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||