(token)
| 77 | } |
| 78 | |
| 79 | function endAccountMaintenance(token) { |
| 80 | const account = token?.account; |
| 81 | if (!account) return; |
| 82 | account._maintenance = Math.max(0, accountMaintenance(account) - 1); |
| 83 | if (account._maintenance === 0) account._maintenanceAt = 0; |
| 84 | } |
| 85 | |
| 86 | // Per-tier requests-per-minute limits. Used for both filter-by-cap and |
| 87 | // weighted selection (accounts with more headroom are preferred). |
no test coverage detected