From ee9e42ff17dc2bafd287fa1f069a4de685314559 Mon Sep 17 00:00:00 2001 From: kballou Date: Tue, 21 Oct 2014 13:31:56 -0600 Subject: Fix supervisor children declaration There is a subtle difference between worker and supervisor when declaring supervisor children which is the default shutdown timer [1]: http://elixir-lang.org/docs/stable/elixir/ --- lib/poolparty/supervisor.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/poolparty/supervisor.ex b/lib/poolparty/supervisor.ex index 712f0dc..2651d2c 100644 --- a/lib/poolparty/supervisor.ex +++ b/lib/poolparty/supervisor.ex @@ -15,7 +15,8 @@ defmodule PoolParty.Supervisor do pool_size = Application.get_env(:poolparty, :pool_size) Logger.debug("[#{__MODULE__}]: Pool size: #{pool_size}") children = [worker(PoolParty.Scheduler, [pool_size, event_manager]), - worker(PoolParty.Pool.Supervisor, [pool_size, event_manager])] + supervisor(PoolParty.Pool.Supervisor, + [pool_size, event_manager])] supervise(children, strategy: :one_for_one) end end -- cgit v1.2.1