Merge pull request 'fix(news): drop future-dated items at ingest, hide them in /api/news' (#52) from wt/t_b8b8e927 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
This commit is contained in:
commit
58f71f5b45
5 changed files with 176 additions and 3 deletions
|
|
@ -43,7 +43,10 @@ feeds (`GET /api/news` exact key set is unchanged on purpose).
|
|||
URLs from `urls.txt` (homepages autodiscover RSS; feed URLs are parsed
|
||||
directly), follows each `<item>` link, extracts the main article body, and
|
||||
the `PostgresPipeline` writes to `articles` with URL-based dedup
|
||||
(`ON CONFLICT (url) DO NOTHING`).
|
||||
(`ON CONFLICT (url) DO NOTHING`). Items whose parsed publish date is more
|
||||
than 2 hours in the future are dropped at ingest (`future_dated_dropped`)
|
||||
and never surface via `/api/news`, which additionally hides any
|
||||
`articles.timestamp > now()` row until its date arrives.
|
||||
2. **Summarizer** — `news/summerizer/run_news_summarizer.py` runs
|
||||
`summarizer.py` every `NEWS_SUMMARIZE_INTERVAL_S` (default 900) over the
|
||||
last `SUMMARY_WINDOW_MINUTES` (default 15), and again at 23:00
|
||||
|
|
|
|||
Loading…
Reference in a new issue