diff --git a/config/runtime.exs b/config/runtime.exs index 1e1b7d2..2adb277 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -1,6 +1,5 @@ import Config -config :frajtano, - listen_path: Path.expand(System.get_env("FRAJTANO_DIR")) |> Path.join("agent.sock"), - initial_peers: System.get_env("FRAJTANO_PEERS", "") |> String.split(":", trim: true) |> Enum.map(&Path.expand/1) - + +config :frajtano, + listen_path: Path.expand(System.get_env("FRAJTANO_DIR")) |> Path.join("agent.sock") diff --git a/lib/agent.ex b/lib/agent.ex index 4c291c2..fb89c5d 100644 --- a/lib/agent.ex +++ b/lib/agent.ex @@ -11,16 +11,9 @@ defmodule Frajtano.Agent do { :ok, %{}, - {:continue, :init_peers} } end - @impl true - def handle_continue(:init_peers, state) do - for peer <- Application.fetch_env!(:frajtano, :initial_peers), do: {:ok, _} = Peer.start(peer) - {:noreply, state} - end - # select: list of specs, where specs are a tuple of match, guards, and outputs # match is {key, pid, value}, :"$1" is a match variable def peer_paths() do