blob: 2f4d150fa30170f42a9d51b4facb985ed1c7f6cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
defmodule PoolParty.Supervisor do
use Supervisor
def start_link(opts \\ []) do
Supervisor.start_link(__MODULE__, {}, [name: __MODULE__] ++ opts)
end
def init(_) do
pool_size = Application.get_env(:poolparty, :pool_size)
children = [worker(PoolParty.Scheduler, [pool_size]),
worker(PoolParty.Pool.Supervisor, [pool_size])]
supervise(children, strategy: :one_for_one)
end
end
|