fix: replace Mix.env() with Application.get_env() for production compatibility

Mix is not available in production releases. Use Application.get_env/3
to check environment at runtime instead of Mix.env().
This commit is contained in:
Graham McIntire 2026-03-09 12:47:50 -05:00
parent 4cf39e66a6
commit 4b11f74e39
No known key found for this signature in database

View file

@ -283,7 +283,7 @@ defmodule ToweropsWeb.DeviceLive.Index do
end
defp tick_interval_ms do
if Mix.env() == :test, do: :infinity, else: to_timeout(second: 15)
if Application.get_env(:towerops, :env) == :test, do: :infinity, else: to_timeout(second: 15)
end
defp schedule_tick do