fix: scan episodes synchronously and disable test mode rate limiting
- Always scan missing episodes sync in add_series to avoid race condition - Add db fallback in get_anime when in-memory episodeDict empty - Add with_episodes param to AnimeSeriesService.get_by_key - Disable auth rate limiting and lockout in test mode (ANIWORLD_TESTING=1) - Simplify responsive.robot tests: fix setup, remove fragile width checks
This commit is contained in:
@@ -634,11 +634,11 @@ app.mount("/static", StaticFiles(directory=str(STATIC_DIR)), name="static")
|
||||
app.add_middleware(SetupRedirectMiddleware)
|
||||
|
||||
# Attach authentication middleware (token parsing + simple rate limiter)
|
||||
# Use a higher rate limit in test mode to avoid 429 errors during rapid test execution
|
||||
# Disable rate limiting in test mode to avoid 429 errors during rapid test execution
|
||||
import os
|
||||
|
||||
_test_mode = os.getenv("ANIWORLD_TESTING") == "1"
|
||||
_auth_rate_limit = 10 if _test_mode else 5
|
||||
_auth_rate_limit = 0 if _test_mode else 5
|
||||
app.add_middleware(AuthMiddleware, rate_limit_per_minute=_auth_rate_limit)
|
||||
|
||||
# Include routers
|
||||
|
||||
Reference in New Issue
Block a user