thermograph/deploy
Emi Griffith 9611a7be8b Add a worker scheduler for city warming and IndexNow pings (#242)
warm_cities.py and indexnow.py are one-shot scripts run manually at deploy
today - nothing keeps the curated city set topped up, or pings IndexNow,
between deploys.

Add notifications/scheduler.py: an in-process APScheduler instance driving
two recurring jobs (city warming, daily; IndexNow --if-changed, every 6h by
default), gated by the same leader election as the notifier - only the
process that already won leadership starts it, so the jobs run in exactly
one place under multi-host Swarm rather than once per replica. Neither job
runs immediately on start: warm_cities already runs at deploy time, so an
immediate duplicate on every worker boot/restart would be wasted work.

Extract indexnow.submit_if_changed() from the CLI's --if-changed branch so
the scheduler and the command line share the exact same skip-when-unchanged
logic instead of two copies drifting apart. The CLI's plain (non-flag) path
is unchanged.

APScheduler over a Postgres-native queue: exactly one process ever runs
this, no fan-out/backpressure/dead-letter need, no new infrastructure.
2026-07-21 01:26:39 +00:00
..
db Move the climate record from parquet to TimescaleDB hypertables (#227) 2026-07-20 20:15:55 +00:00
forgejo Add agent VPS access, a 2-node Docker Swarm, and Forgejo CI/CD (#234) 2026-07-21 00:36:39 +00:00
openmeteo Scale DB tuning from DB_MEMORY; order Docker after the rclone mount (#226) 2026-07-20 14:33:09 +00:00
swarm Add agent VPS access, a 2-node Docker Swarm, and Forgejo CI/CD (#234) 2026-07-21 00:36:39 +00:00
Caddyfile Add the Swarm interim stack file, a pinnable TimescaleDB tag, and a Caddy health-gate (#235) 2026-07-21 00:39:48 +00:00
deploy.sh Containerize the app and move the databases to PostgreSQL 18 (#220) 2026-07-20 06:28:23 +00:00
POSTGRES-MIGRATION.md Move the climate record from parquet to TimescaleDB hypertables (#227) 2026-07-20 20:15:55 +00:00
provision-agent-access.sh Add agent VPS access, a 2-node Docker Swarm, and Forgejo CI/CD (#234) 2026-07-21 00:36:39 +00:00
provision-mail.sh Rebuild the homepage as a distribution landing; add an SMTP seam (#178) 2026-07-18 07:39:47 +00:00
thermograph-dev.service Add dev CI/CD pipeline deploying to a LAN server (#6) 2026-07-11 02:13:18 +00:00
thermograph.env.example Add a worker scheduler for city warming and IndexNow pings (#242) 2026-07-21 01:26:39 +00:00
thermograph.service Containerize the app and move the databases to PostgreSQL 18 (#220) 2026-07-20 06:28:23 +00:00