feature: alarm

This commit is contained in:
Mikkeli Matlock
2026-02-15 21:11:33 +09:00
parent 12dbbd8942
commit dca989a01b
14 changed files with 543 additions and 1 deletions

15
pi/run_all.py Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
"""Launch stats_server and audio_server as child processes."""
import subprocess, sys, signal
from pathlib import Path
d = Path(__file__).parent
procs = [
subprocess.Popen([sys.executable, d / "stats_server.py"]),
subprocess.Popen([sys.executable, d / "audio_server.py"]),
]
signal.signal(signal.SIGINT, lambda *_: [p.terminate() for p in procs])
signal.signal(signal.SIGTERM, lambda *_: [p.terminate() for p in procs])
print(f"Running stats_server (PID {procs[0].pid}) + audio_server (PID {procs[1].pid})")
for p in procs:
p.wait()