Browse Source

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.
Seth Falcon 13 years ago
parent
commit
ff4a521aa0
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/pooler_sup.erl

+ 1 - 2
src/pooler_sup.erl

@@ -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]}}.
-