summaryrefslogtreecommitdiff
path: root/systemd/synoptic-morph.service
diff options
context:
space:
mode:
authorSt33v <github@f3rr3t.com>2026-06-10 19:10:38 +1000
committerSt33v <github@f3rr3t.com>2026-06-10 19:10:38 +1000
commite433a99ceddf7168d23377ffc8d585fc80ba8fb2 (patch)
tree32f7ff056e404ae1d4563125c169bd4c535992aa /systemd/synoptic-morph.service
parent59e7c485be1e9be62f0b4cdb7d1130701c1e3c46 (diff)
Add synoptic-morph: 30-day rolling morph timelapse
synopticMorph.sh: rolling-cache implementation. On each run: 1. Pick the last WINDOW_DAYS*4 charts from the archive. 2. For each adjacent pair, fill any missing pair-morph (cached at /mnt/enclave/synoptic/pairs/<chartA>__<chartB>/p_NNNN.png). 3. Evict pair dirs whose slug isn't in the current window. 4. Symlink frames into a temp seq dir with LINGER on each source chart and DWELL on the latest, fade-in 1s and fade-out 2s. 5. Encode to /srv/www/pestrel/morph.mp4 with ffmpeg/h264. Bootstrap: ~50 min CPU on first run (119 pair morphs at ~25s each). Steady state: ~1 min/cycle (1 new pair + concat + encode). synoptic-morph.service: oneshot, TimeoutStartSec=2h to cover the bootstrap, Nice=10 + IOSchedulingClass=idle so it doesn't fight the system for CPU/disk. synoptic.service gains OnSuccess=synoptic-morph.service so the chain fires automatically after each successful chart fetch. morph.html: points at /morph.mp4 now. index.html: "Three-day history" button renamed to "Monthly history", URL /morph.html. setup.sh: installs the new unit + script, provisions /mnt/enclave/synoptic/{pairs,out} when the enclave mount is present. .gitignore: drop .claude/ (transient harness state). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'systemd/synoptic-morph.service')
-rw-r--r--systemd/synoptic-morph.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/systemd/synoptic-morph.service b/systemd/synoptic-morph.service
new file mode 100644
index 0000000..042b697
--- /dev/null
+++ b/systemd/synoptic-morph.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Render rolling 30-day synoptic-chart morph timelapse
+
+[Service]
+Type=oneshot
+User=st33v
+WorkingDirectory=/mnt/enclave/synoptic
+ExecStart=/opt/synoptic/synopticMorph.sh
+# Bootstrap can take ~50 min (119 pair morphs); steady-state is ~1 min.
+TimeoutStartSec=2h
+Nice=10
+IOSchedulingClass=idle
+ExecStopPost=/bin/sh -c 'STATUS=SUCCESS; [ "$$EXIT_STATUS" != "0" ] && STATUS=FAILURE; logger -t synoptic-morph -p user.err "synoptic-morph $$STATUS exit=$$EXIT_STATUS"'
+SyslogIdentifier=synoptic-morph
+StandardOutput=journal
+StandardError=journal