Remove unused support for initial peers
This commit is contained in:
@@ -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)
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user