diff --git a/lib/towerops_web/telemetry.ex b/lib/towerops_web/telemetry.ex index 3ce60de7..bc8eb05a 100644 --- a/lib/towerops_web/telemetry.ex +++ b/lib/towerops_web/telemetry.ex @@ -136,7 +136,7 @@ defmodule ToweropsWeb.Telemetry do """ def publish_exq_stats do # Only run if Exq is available (not in test env) and the process is running - if Application.get_env(:towerops, :env) == :test or not Process.whereis(Exq) do + if Application.get_env(:towerops, :env) == :test or is_nil(Process.whereis(Exq)) do :ok else try do