|
Some checks are pending
Deploy / build-frontend (push) Blocked by required conditions
Deploy / deploy (push) Blocked by required conditions
Deploy / build-backend (push) Blocked by required conditions
Deploy / build-worker (push) Blocked by required conditions
Deploy / changes (push) Successful in 7s
В complete-loop'е min(...,30) применялся ТОЛЬКО к exponential backoff'у
(else-ветка). Серверный Retry-After уходил в time.sleep как есть.
_parse_retry_after принимает любое число секунд ("86400".isdigit() → True),
а provider'ы шлют Retry-After до 86400с при quota-exhaustion (OpenAI,
CDN-503). Эффект: time.sleep блокирует поток anyio-threadpool на часы
(до 48ч при llm_max_retries=2). Async-консьюмер (chat.py) мостится через
run_in_threadpool — поток держит токен пула (~40 потоков, общий с sync
Depends(get_db)) и DB-сессию → пул исчерпывается → стопор приложения.
Patch: вынес кап на module-level _MAX_BACKOFF_S=30s, применяю к ОБЕИМ
веткам (Retry-After И exp.backoff). raw_wait логируется отдельно для
наблюдаемости (видно когда провайдер просил больше).
Новый юнит-тест test_rate_limited_retry_after_capped: provider шлёт
retry_after=86400 → time.sleep вызывается с 30 (не 86400). 14/14
client тестов + 55/55 LLM-suite зелёные. ruff clean.
Closes #1209
|
||
|---|---|---|
| .. | ||
| analysis_runs | ||
| cadastre | ||
| chat | ||
| exporters | ||
| forecasting | ||
| llm | ||
| scrapers | ||
| site_finder | ||
| __init__.py | ||
| test_cadastre_bulk.py | ||
| test_ekburg_permits.py | ||
| test_forecast_request_cache.py | ||
| test_functional_zone_lookup.py | ||
| test_granddoc_lookup.py | ||
| test_ird_analyze.py | ||
| test_ird_overlay_lookup.py | ||
| test_krt_lookup.py | ||
| test_newbuilding_crossload.py | ||
| test_nspd_denorm.py | ||
| test_objective_backfill.py | ||
| test_own_developer_ids_config.py | ||
| test_planning_lookup.py | ||
| test_quarter_dump_lookup.py | ||
| test_recommend_mix_velocity.py | ||
| test_reservation_lookup.py | ||
| test_weather_cache.py | ||
| test_zone_regulation_extract.py | ||