feat: Implement a waiting queue for account acquisition with configurable limits and updated status reporting.

This commit is contained in:
CJACK
2026-02-16 20:30:21 +08:00
parent 888a0e6bff
commit a6a87853d4
8 changed files with 265 additions and 10 deletions

View File

@@ -16,9 +16,17 @@ LOG_LEVEL=INFO
# Recommended client concurrency is calculated dynamically as:
# account_count * DS2API_ACCOUNT_MAX_INFLIGHT
# So by default it is account_count * 2.
# Requests beyond inflight slots enter a waiting queue first.
# Default queue size equals recommended concurrency, so 429 starts after:
# account_count * DS2API_ACCOUNT_MAX_INFLIGHT * 2
# Alias: DS2API_ACCOUNT_CONCURRENCY
# DS2API_ACCOUNT_MAX_INFLIGHT=2
# Optional waiting queue size override for managed-key mode.
# Default: recommended_concurrency (same as account_count * inflight_limit)
# Alias: DS2API_ACCOUNT_QUEUE_SIZE
# DS2API_ACCOUNT_MAX_QUEUE=10
# ---------------------------------------------------------------
# Admin auth
# ---------------------------------------------------------------