summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2014-10-21 13:31:56 -0600
committerkballou <kballou@devnulllabs.io>2014-10-21 13:31:56 -0600
commitee9e42ff17dc2bafd287fa1f069a4de685314559 (patch)
tree7f0bc2fb1d3bc85df7f27046e7bd562066b97822
parent5ba91fecec283003690072773638f2f143a2b0fa (diff)
downloadpoolparty-ee9e42ff17dc2bafd287fa1f069a4de685314559.tar.gz
poolparty-ee9e42ff17dc2bafd287fa1f069a4de685314559.tar.xz
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/
-rw-r--r--lib/poolparty/supervisor.ex3
1 files changed, 2 insertions, 1 deletions
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