blitz_api/app/system
fusion44 b8677cbbf1
Some checks failed
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
fix(system): tolerate empty hardware Redis values on VM setups
On VM installs (e.g. Proxmox) the RaspiBlitz monitor scripts don't
populate keys like system_cpu_load / system_ram_mb / system_temp_celsius,
so redis returns empty strings. get_hardware_info did int('')/float('')
and raised ValueError, which killed the _handle_gather_hardware_info
background task ('Task exception was never retrieved') - hardware SSE
updates then stopped until restart.

- parse the hardware Redis values via _safe_int/_safe_float, returning
  zero values instead of crashing (and guard the vram-percent division
  by zero)
- wrap the gatherer loop body in try/except so a single failure can no
  longer kill the task

Fixes #271

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 14:45:21 +02:00
..
impl fix(system): tolerate empty hardware Redis values on VM setups 2026-07-08 14:45:21 +02:00
__init__.py refactor: switch to domain driven directory layout 2022-10-03 20:22:00 +02:00
docs.py feat: implement Ruff as a linter; fix given errors 2023-06-25 07:17:00 +02:00
models.py fix(system): stop leaking passwords via change-password endpoint 2026-07-03 21:42:25 +02:00
router.py fix(system): stop leaking passwords via change-password endpoint 2026-07-03 21:42:25 +02:00
service.py fix(system): tolerate empty hardware Redis values on VM setups 2026-07-08 14:45:21 +02:00