Weather: Replace wttr.in with Open-Meteo + structured logging
- Replace wttr.in (unreachable from Docker) with Open-Meteo API (free, no API key, reliable) with geocoding cache - WMO weather codes mapped to German descriptions + emoji icons - Add [WEATHER], [NEWS], [UNRAID], [DASHBOARD] log prefixes - Structured integration status table on startup - Suppress noisy httpx INFO logs (services log their own summaries) - Add logging to unraid_service (was completely silent on errors) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
94cf618e0d
commit
d3305a243c
6 changed files with 280 additions and 196 deletions
|
|
@ -43,6 +43,7 @@ async def get_news_articles(
|
|||
# --- cache hit? -----------------------------------------------------------
|
||||
cached = await cache.get(key)
|
||||
if cached is not None:
|
||||
logger.debug("[NEWS] Cache hit (key=%s)", key)
|
||||
return cached
|
||||
|
||||
# --- cache miss -----------------------------------------------------------
|
||||
|
|
@ -51,8 +52,10 @@ async def get_news_articles(
|
|||
|
||||
try:
|
||||
articles = await get_news(limit=limit, offset=offset, category=category, max_age_hours=get_settings().news_max_age_hours)
|
||||
logger.info("[NEWS] Fetched %d articles (limit=%d, offset=%d, category=%s)",
|
||||
len(articles), limit, offset, category)
|
||||
except Exception as exc:
|
||||
logger.exception("Failed to fetch news articles")
|
||||
logger.exception("[NEWS] Failed to fetch articles")
|
||||
return {
|
||||
"articles": [],
|
||||
"total": 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue