towerops/lib/towerops_web
Graham McIntire d0946c3cd0
refactor: simplify job architecture from Oban coordinators to direct workers
Removes unnecessary two-layer architecture (Oban Coordinator → GenServer)
in favor of direct Oban workers that perform the actual work.

Changes:
- Replace DevicePollerCoordinator + PollerWorker with DevicePollerWorker
- Replace DeviceMonitorCoordinator + DeviceMonitor with DeviceMonitorWorker
- Simplify Monitoring.Supervisor (removed Registries, DynamicSupervisors)
- Remove all Exq dependencies (workers, supervisor, mix deps)
- Convert DiscoveryWorker from Exq to Oban pattern
- Update Devices context to auto-start/stop monitoring and polling
- Update all LiveView callers to use new Oban enqueue pattern
- Fix all tests to use Oban.Job struct instead of raw IDs

Benefits:
- Simpler codebase (~850 lines removed)
- Better reliability (Oban handles retries, failures)
- Lower memory (no persistent GenServers)
- Better observability (work visible in Oban dashboard)
- Cluster-wide coordination via PostgreSQL
- Extensive PubSub usage for real-time events

Files deleted:
- lib/towerops/workers/device_monitor_coordinator.ex
- lib/towerops/workers/device_poller_coordinator.ex
- lib/towerops/snmp/poller_worker.ex
- lib/towerops/monitoring/device_monitor.ex
- lib/towerops/workers/monitor_worker.ex
- lib/towerops/workers/poll_worker.ex
- lib/towerops/exq_supervisor.ex
- All related test files

Files created:
- lib/towerops/workers/device_poller_worker.ex
- lib/towerops/workers/device_monitor_worker.ex

All 3,686 tests passing.
2026-01-24 16:36:57 -06:00
..
channels refactor: simplify job architecture from Oban coordinators to direct workers 2026-01-24 16:36:57 -06:00
components sanitize snmp data and fix some cpu things 2026-01-22 16:53:01 -06:00
controllers bring in snmpkit 2026-01-23 12:52:17 -06:00
helpers test improvements 2026-01-18 17:15:44 -06:00
live refactor: simplify job architecture from Oban coordinators to direct workers 2026-01-24 16:36:57 -06:00
plugs feat: update UI to Tailwind Plus design system and fix auth redirects 2026-01-18 09:56:49 -06:00
endpoint.ex agent improvements and agent config 2026-01-16 17:26:51 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
router.ex add honeybadger and snmp overhaul 2026-01-18 16:16:08 -06:00
telemetry.ex exq improvements 2026-01-18 11:50:19 -06:00
user_auth.ex feat: add 5 new vendor modules and fix dialyzer issues 2026-01-22 09:34:50 -06:00