Remove unused support for initial peers

This commit is contained in:
bluepython508
2024-09-24 22:15:38 +01:00
parent 23d3a97643
commit 25c260c4a5
2 changed files with 3 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
import Config import Config
config :frajtano, config :frajtano,
listen_path: Path.expand(System.get_env("FRAJTANO_DIR")) |> Path.join("agent.sock"), 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)

View File

@@ -11,16 +11,9 @@ defmodule Frajtano.Agent do
{ {
:ok, :ok,
%{}, %{},
{:continue, :init_peers}
} }
end 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 # select: list of specs, where specs are a tuple of match, guards, and outputs
# match is {key, pid, value}, :"$1" is a match variable # match is {key, pid, value}, :"$1" is a match variable
def peer_paths() do def peer_paths() do