From 4b11f74e391d72866234de27ba58370d8d85a128 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 9 Mar 2026 12:47:50 -0500 Subject: [PATCH] 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(). --- lib/towerops_web/live/device_live/index.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/towerops_web/live/device_live/index.ex b/lib/towerops_web/live/device_live/index.ex index 95e070d1..2087a4db 100644 --- a/lib/towerops_web/live/device_live/index.ex +++ b/lib/towerops_web/live/device_live/index.ex @@ -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