Add weather caching, useless-tip redirect, clock widget, and IAM Bedrock auth

- Cache the latest fetched tomorrow weather and expose it via /api/system/weather/latest
- Add a header Clock widget showing date/time plus the cached weather summary
- Redirect useless-talk mentions from the weather bot to the useless-tips webhook
- Switch Bedrock auth from bearer token to standard IAM access key/secret

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 15:15:11 +09:00
co-authored by Claude Sonnet 4.6
parent 4a08ba29fa
commit 4e837d1419
8 changed files with 160 additions and 4 deletions
+19
View File
@@ -0,0 +1,19 @@
"""直近で取得した「明日の天気」データをメモリ上にキャッシュする。"""
from datetime import datetime
_latest: dict | None = None
def set_latest(weather: str, pop: int | None, judgement: str, reason: str) -> None:
global _latest
_latest = {
"weather": weather,
"pop": pop,
"judgement": judgement,
"reason": reason,
"fetched_at": datetime.now().isoformat(),
}
def get_latest() -> dict | None:
return _latest