towerops/lib/towerops/workers
mayor 0c77dd84e7
Add strict typespecs to all Oban worker perform/1 functions
Adds @spec annotations to all Oban worker perform/1 functions to improve
static analysis and documentation. Return types are specific to each worker's
actual behavior:

Workers returning 🆗
- BackupSummaryWorker
- BackupTimeoutWorker
- DeviceMonitorWorker
- DevicePollerWorker
- JobHealthCheckWorker
- NeighborCleanupWorker

Workers with complex returns:
- DiscoveryWorker: :ok | :discard
- FirmwareVersionFetcherWorker: :ok | {:error, term()}
- LoginHistoryCleanupWorker: {:ok, %{deleted: non_neg_integer(), anonymized_deleted: non_neg_integer()}}
- MikrotikBackupWorker: :ok | {:error, String.t()}
- SessionCleanupWorker: {:ok, %{sessions_deleted: non_neg_integer()}}

Analysis found that none of these workers have complex job parameters that
would benefit from embedded schemas - all use either no parameters or simple
device_id strings passed in job args.

StaleAgentWorker already had a typespec on find_stale_agents/0 from previous work.

All 98 worker tests passing after changes.
2026-02-06 09:50:51 -06:00
..
agent_latency_evaluator.ex fix: resolve all dialyzer unmatched return and pattern match warnings 2026-01-24 17:34:37 -06:00
backup_summary_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
backup_timeout_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
device_monitor_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
device_poller_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
discovery_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
firmware_version_fetcher_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
job_cleanup_task.ex feat: add automatic polling job cleanup on deployment 2026-02-05 08:28:27 -06:00
job_health_check_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
login_history_cleanup_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
mikrotik_backup_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
polling_offset.ex add oban pro 2026-01-26 17:07:42 -06:00
session_cleanup_worker.ex Add strict typespecs to all Oban worker perform/1 functions 2026-02-06 09:50:51 -06:00
stale_agent_worker.ex Add comprehensive typespecs to agent-related modules 2026-02-06 09:33:44 -06:00