## Summary - **Ping checks never scheduled**: `ensure_default_ping_check` created check records but never called `schedule_check`, so auto-created ping checks never executed - **Skipped checks permanently orphaned**: `CheckExecutorWorker` only rescheduled checks that actually executed — skipped checks (agent-assigned, SNMP disabled) broke the scheduling chain permanently - **No recovery mechanism**: `JobHealthCheckWorker` only recovered `DeviceMonitorWorker` jobs, not `CheckExecutorWorker` jobs — any lost check job was gone forever ## Changes - `monitoring.ex`: Call `schedule_check` after creating ping check in `ensure_default_ping_check` - `check_executor_worker.ex`: Reschedule skipped-but-enabled checks so conditions are re-evaluated next cycle - `job_health_check_worker.ex`: Recover orphaned `CheckExecutorWorker` jobs for enabled checks (runs every 10 min) - `devices.ex`: Wrap `ensure_default_ping_check` in try/rescue for deadlock resilience ## Test plan - [x] New tests: ping check scheduling on creation, no duplicate scheduling on idempotent call - [x] Updated tests: skipped checks now assert rescheduling instead of orphaning - [x] New tests: health check worker recovers orphaned check executor jobs, skips disabled checks - [x] All 177 targeted tests pass - [x] Compile clean with warnings-as-errors - [x] Pre-commit hooks pass (credo, format) Reviewed-on: graham/towerops-web#71 |
||
|---|---|---|
| .. | ||
| mix/tasks | ||
| snmpkit | ||
| towerops | ||
| towerops_web | ||
| snmp_lib.ex | ||
| snmp_mgr.ex | ||
| snmpkit.ex | ||
| towerops.ex | ||
| towerops_native.ex | ||
| towerops_web.ex | ||