feat: summarize hourly news via Nous portal into brief/ticker/map

This commit is contained in:
Sirius DevOps 2026-08-27 23:17:45 -04:00
commit 8f3699f133
2 changed files with 216 additions and 75 deletions

View file

@ -10,7 +10,7 @@ The loop is serial, so a slow LLM pass never overlaps the next run.
Env (all optional, 12-factor):
NEWS_SUMMARIZE_MINUTE minute of the hour to fire (default 5)
NEWS_SUMMARIZE_RUN_ON_START "1" to summarize once immediately on boot (default 1)
GEMINI_API_KEY required to do real work; unset = idle
NOUS_API_KEY optional in env; Keys UI / api_keys also works
"""
from __future__ import annotations
@ -46,10 +46,9 @@ def run_summarize() -> None:
def main() -> None:
if not os.getenv("GEMINI_API_KEY", "").strip():
if not os.getenv("NOUS_API_KEY", "").strip():
logger.warning(
"GEMINI_API_KEY not set — summarizer will idle (set it in .env and "
"recreate the service to enable)"
"NOUS_API_KEY unset in env — will read api_keys on each run; idle if both empty"
)
logger.info(
"news summarizer loop starting (minute=%s, run_on_start=%s)",