news-cycle.timer runs poll then notify every 15 minutes; news-digest.timer runs the briefing at 08:45 daily. Both enabled and verified: a manual cycle fetched 1047 items, embedded 95 new ones and clustered them in 74s. Units are installed as COPIES rather than symlinks. The previous service's units were symlinked into docs/projects/news/deploy/, and when that repo was renamed to news_triage they became dangling and the timer failed every ten minutes, unnoticed, until this rebuild found it. Copying costs a re-copy after editing; symlinking cost days of silent failure. Deliberate details: the poll ExecStart is `-` prefixed so a failed fetch does not skip notify; RandomizedDelaySec spreads polling off the quarter hour rather than hitting 56 sources at once; the digest is Persistent so a machine that was off at 08:45 still sends rather than skipping the day.
16 lines
690 B
Desktop File
16 lines
690 B
Desktop File
[Unit]
|
|
Description=news: fetch, embed, cluster, then send any alerts
|
|
Documentation=file:///home/connor/docs/projects/news/deploy/README.md
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
# `-` on the poll so a failed fetch does not skip notify: there may still be
|
|
# ripe clusters from an earlier cycle worth sending.
|
|
ExecStart=-/usr/bin/podman exec connor_news-backend_1 python -m news.cli poll
|
|
ExecStart=/usr/bin/podman exec connor_news-backend_1 python -m news.cli notify
|
|
# A cold cycle embeds the whole backlog at ~11 items/sec, so it can legitimately
|
|
# run for minutes. Steady state is far quicker; this is a ceiling, not a target.
|
|
TimeoutStartSec=20min
|