Skip to content

Commit

Permalink
address formatting linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tvogel committed Oct 20, 2024
1 parent 81c140e commit bc0e375
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end

socket_options_for_host = fn host when is_binary(host) ->
case detect_ip_version.(host) do
{:ok, ip_version} -> [ ip_version ]
{:ok, ip_version} -> [ip_version]
{:error, reason} -> raise "Failed to detect IP version: #{reason}"
end
end
Expand Down Expand Up @@ -63,15 +63,16 @@ config :logflare,
config :logflare,
LogflareWeb.Endpoint,
filter_nil_kv_pairs.(
http: filter_nil_kv_pairs.(
http:
filter_nil_kv_pairs.(
port: System.get_env("PHX_HTTP_PORT"),
ip:
case System.get_env("PHX_HTTP_IP") do
nil -> nil
value -> case :inet.parse_address(to_charlist(value)) do
{:ok, ip} -> ip
{:error, _} -> raise "Failed to parse IP address: #{value}"
end
nil -> nil
value -> case :inet.parse_address(to_charlist(value)) do
{:ok, ip} -> ip
{:error, _} -> raise "Failed to parse IP address: #{value}"
end
end
),
url:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ defmodule Logflare.Backends.Adaptor.PostgresAdaptor.SharedRepo do

opts ++ fields
end

opts = opts ++ [socket_options: config[:socket_options]]

with {:error, {:already_started, pid}} <- Supervisor.start_child({__MODULE__, opts}) do
Expand Down

0 comments on commit bc0e375

Please sign in to comment.