From 25c260c4a5249c1fecbddb464352c6150cf3fb36 Mon Sep 17 00:00:00 2001 From: bluepython508 <16466646+bluepython508@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:15:38 +0100 Subject: [PATCH] Remove unused support for initial peers --- config/runtime.exs | 7 +++---- lib/agent.ex | 7 ------- 2 files changed, 3 insertions(+), 11 deletions(-) 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