From 5ffb0c7fd525f5a65a3c0ffd8a3568b5cdaf6e4f Mon Sep 17 00:00:00 2001 From: Nicolas Sanchez Date: Fri, 16 Aug 2024 19:25:37 -0300 Subject: [PATCH] Fix metrics endpoint port parse --- config/runtime.exs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 5b53e507e..29b987cab 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -49,8 +49,11 @@ end ############################ metrics_endpoint_port = - (System.get_env("METRICS_ENDPOINT_PORT") || "9568") - |> String.to_integer() + if System.get_env("METRICS_ENDPOINT_PORT") in [nil, ""] do + 9568 + else + System.get_env("METRICS_ENDPOINT_PORT") |> String.to_integer() + end config :arena, :gateway_url, System.get_env("GATEWAY_URL") || "http://localhost:4001" config :arena, :metrics_endpoint_port, metrics_endpoint_port