mirror of
https://github.com/Screenly/Anthias.git
synced 2026-06-10 17:18:43 -04:00
The docker-build workflow's matrix still listed the websocket and nginx services afterf421130bdeleted their Dockerfiles, so every push to master since Apr 27 fails the `websocket`/`nginx` matrix jobs. The publish-latest-tag step is gated on the full matrix succeeding, so the floating `latest-<board>` tags have been stuck on a pre-f421130b SHA that's also post-ee12387b — the worst possible window: * `bin/start_viewer.sh` runs `python -m viewer` via `sudo -E -u viewer`.ee12387bmoved Python deps from system site-packages into `/venv`, but sudo strips PATH to its `secure_path` even with `-E`, so `python` resolves to `/usr/bin/python3` (no Anthias deps) and the viewer dies on `import django`. Pin the absolute `/venv/bin/python` so sudo's PATH reset is a no-op. * `lib/diagnostics.get_display_power()` calls `cec.init()` and `tv.is_on()` directly. libcec can block in a C call (TV asleep, HDMI link dropped, CEC bus quiet) that ignores Python signals, so the celery task hits its 30s hard `time_limit` and gets SIGKILL'd every 5 minutes. Run the CEC query in a subprocess with `subprocess.run(..., timeout=10)` so a hung libcec call can be killed cleanly. The secondary `_Code.co_positions` AttributeError in the worker logs is billiard's broken traceback formatter for that timeout exception — it goes away once the hang stops. Drop `websocket` and `nginx` from the `service` matrix and from the `SERVICES=(...)` list in the latest-tag mirror step so the workflow can go green again. Once a build publishes, fresh installs will pull post-f421130b images that have the uvicorn server (which serves statics itself, no nginx required) plus the two fixes above. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>