Permalink
Browse files

Ask for config for the pooler app explicitly in pooler_sup

If pooler is specified as an included_application in another
application, then application:get_all_env/0 may not be what we
want. This way, pooler always looks for pooler-specific app config.
  • Loading branch information...
1 parent 50e3555 commit ff4a521aa08162d406f520b88a59f3bf4364b921 @seth committed Mar 5, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/pooler_sup.erl
View
@@ -8,10 +8,9 @@ start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
- Config = application:get_all_env(),
+ Config = application:get_all_env(pooler),
Pooler = {pooler, {pooler, start_link, [Config]},
permanent, 5000, worker, [pooler]},
PoolerPool = {pooler_pool_sup, {pooler_pool_sup, start_link, []},
permanent, 5000, supervisor, [pooler_pool_sup]},
{ok, {{one_for_one, 5, 10}, [PoolerPool, Pooler]}}.
-

0 comments on commit ff4a521

Please sign in to comment.