towerops/test/towerops
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
..
accounts Add UserNotifier tests 2026-01-13 08:25:20 -06:00
agents perf: optimize slow tests with bulk inserts and fewer iterations 2026-01-24 15:13:21 -06:00
api_tokens add parallel build 2026-01-19 14:17:05 -06:00
ecto_types Add comprehensive test coverage for core context modules 2026-01-19 14:38:34 -06:00
equipment test cleanup 2026-01-19 13:29:38 -06:00
monitoring refactor: simplify job architecture from Oban coordinators to direct workers 2026-01-24 16:36:57 -06:00
organizations rename equipment to device 2026-01-17 14:48:46 -06:00
profiles Add comprehensive test coverage for core context modules 2026-01-19 14:38:34 -06:00
proto add parallel build 2026-01-19 14:17:05 -06:00
sites Add comprehensive tests for Sites.Site schema 2026-01-13 09:05:02 -06:00
snmp perf: optimize slow tests - reduce timeouts and property test iterations 2026-01-24 15:22:56 -06:00
workers refactor: simplify job architecture from Oban coordinators to direct workers 2026-01-24 16:36:57 -06:00
accounts_test.exs use password for user regi 2026-01-21 09:13:08 -06:00
agents_test.exs remote agent/cloud improvements 2026-01-24 09:16:41 -06:00
alerts_test.exs feat: add APC, Arista, Calix, ADTRAN, Allied Telesis vendor modules 2026-01-22 11:00:21 -06:00
api_tokens_test.exs perf: optimize slow tests - reduce timeouts and property test iterations 2026-01-24 15:22:56 -06:00
devices_test.exs perf: optimize slow tests - reduce timeouts and property test iterations 2026-01-24 15:22:56 -06:00
log_filter_test.exs Fix Credo issues and improve code quality 2026-01-19 15:09:19 -06:00
monitoring_test.exs perf: optimize slow tests with bulk inserts and fewer iterations 2026-01-24 15:13:21 -06:00
organizations_test.exs Add comprehensive test coverage for core context modules 2026-01-19 14:38:34 -06:00
profiles_test.exs Add comprehensive test coverage for core context modules 2026-01-19 14:38:34 -06:00
redis_health_check_test.exs more tests 2026-01-22 11:51:35 -06:00
settings_test.exs remote agent/cloud improvements 2026-01-24 09:16:41 -06:00
sites_test.exs credo fix 2026-01-20 16:41:44 -06:00
snmp_test.exs arp 2026-01-23 08:40:57 -06:00