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.
18 lines
463 B
Elixir
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
|