Fix compiler warnings in equipment monitor
- Prefix unused alert variables with underscore - Remove unused test_env?/0 function All warnings resolved, compilation clean with --warnings-as-errors
This commit is contained in:
parent
cb9c095847
commit
f29282d9dc
1 changed files with 2 additions and 7 deletions
|
|
@ -144,7 +144,7 @@ defmodule Towerops.Monitoring.EquipmentMonitor do
|
|||
"Equipment is not responding to ping"
|
||||
end
|
||||
|
||||
{:ok, alert} =
|
||||
{:ok, _alert} =
|
||||
Alerts.create_alert(%{
|
||||
equipment_id: equipment.id,
|
||||
alert_type: :equipment_down,
|
||||
|
|
@ -178,7 +178,7 @@ defmodule Towerops.Monitoring.EquipmentMonitor do
|
|||
"Equipment is now responding to ping"
|
||||
end
|
||||
|
||||
{:ok, alert} =
|
||||
{:ok, _alert} =
|
||||
Alerts.create_alert(%{
|
||||
equipment_id: equipment.id,
|
||||
alert_type: :equipment_up,
|
||||
|
|
@ -221,9 +221,4 @@ defmodule Towerops.Monitoring.EquipmentMonitor do
|
|||
defp via_tuple(equipment_id) do
|
||||
{:via, Registry, {Towerops.Monitoring.Registry, equipment_id}}
|
||||
end
|
||||
|
||||
defp test_env? do
|
||||
config = Application.get_env(:towerops, Towerops.Repo, [])
|
||||
Keyword.get(config, :pool) == Ecto.Adapters.SQL.Sandbox
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue