refactor: minor TigerStyle cleanups
- export_serving.py: move `import re` to module level — was imported inside a loop body on every iteration - sitemap.py: add comment documenting that the in-memory TTL cache is process-local (valid for single-worker deployment, Dockerfile --workers 1) - playtomic_availability.py: use `or "10"` fallback for CIRCUIT_BREAKER_THRESHOLD env var to handle empty-string case Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,9 @@ from quart import Response
|
||||
|
||||
from .core import fetch_all
|
||||
|
||||
# Process-local cache — valid for the current single-Hypercorn-worker deployment
|
||||
# (Dockerfile: `--workers 1`). If worker count increases, replace with a
|
||||
# DB-backed cache (e.g. a single-row SQLite table with an expires_at column).
|
||||
_cache_xml: str = ""
|
||||
_cache_timestamp: float = 0.0
|
||||
CACHE_TTL_SECONDS: int = 3600 # 1 hour
|
||||
|
||||
Reference in New Issue
Block a user