towerops/lib/towerops/workers/escalation_check_worker.ex
Graham McIntire 91e3181bbc dialyzer: fix all unmatched_return warnings (154 → 0)
Prefix fire-and-forget calls (PubSub.broadcast, Oban enqueue, Logger,
update_*, etc.) with `_ =` so dialyzer knows the return value is
intentionally discarded. Wrap a few if/case expressions whose
branches produce mixed types the same way.

No behavior changes — only explicit acknowledgement of discarded
returns.

Warnings: 242 → 88.
2026-04-21 10:03:55 -05:00

18 lines
463 B
Elixir

defmodule Towerops.Workers.EscalationCheckWorker do
@moduledoc """
Oban worker that checks if an on-call incident needs to escalate
to the next rule after the timeout period.
"""
use Oban.Worker,
queue: :notifications,
max_attempts: 3,
priority: 1
alias Towerops.OnCall.Escalation
@impl Oban.Worker
def perform(%Oban.Job{args: %{"incident_id" => incident_id}}) do
_ = Escalation.check_and_escalate(incident_id)
:ok
end
end