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:
Deeman
2026-02-24 20:50:43 +01:00
parent 83d148477d
commit 44c0dd0b8d
3 changed files with 5 additions and 2 deletions

View File

@@ -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