Update the registered name of pool sup.

This commit is contained in:
Feng Lee 2018-12-13 17:25:50 +08:00 committed by Feng Lee
parent 4aaf0a7db4
commit 7fe3d59c28
3 changed files with 6 additions and 5 deletions

View File

@ -30,8 +30,8 @@ start_link() ->
init([]) -> init([]) ->
%% Broker pool %% Broker pool
PoolSize = emqx_vm:schedulers() * 2, PoolSize = emqx_vm:schedulers() * 2,
BrokerPool = emqx_pool_sup:spec(emqx_broker_pool, BrokerPool = emqx_pool_sup:spec(broker_pool,
[broker, hash, PoolSize, [emqx_broker_pool, hash, PoolSize,
{emqx_broker, start_link, []}]), {emqx_broker, start_link, []}]),
%% Shared subscription %% Shared subscription
SharedSub = #{id => shared_sub, SharedSub = #{id => shared_sub,

View File

@ -37,7 +37,8 @@ spec(ChildId, Args) ->
start_link(Pool, Type, MFA) -> start_link(Pool, Type, MFA) ->
start_link(Pool, Type, emqx_vm:schedulers(), MFA). start_link(Pool, Type, emqx_vm:schedulers(), MFA).
-spec(start_link(atom() | tuple(), atom(), pos_integer(), mfa()) -> {ok, pid()} | {error, term()}). -spec(start_link(atom() | tuple(), atom(), pos_integer(), mfa())
-> {ok, pid()} | {error, term()}).
start_link(Pool, Type, Size, MFA) when is_atom(Pool) -> start_link(Pool, Type, Size, MFA) when is_atom(Pool) ->
supervisor:start_link({local, Pool}, ?MODULE, [Pool, Type, Size, MFA]); supervisor:start_link({local, Pool}, ?MODULE, [Pool, Type, Size, MFA]);
start_link(Pool, Type, Size, MFA) -> start_link(Pool, Type, Size, MFA) ->

View File

@ -32,8 +32,8 @@ init([]) ->
modules => [emqx_router_helper]}, modules => [emqx_router_helper]},
%% Router pool %% Router pool
RouterPool = emqx_pool_sup:spec(emqx_router_pool, RouterPool = emqx_pool_sup:spec(router_pool,
[router, hash, emqx_vm:schedulers(), [emqx_router_pool, hash, emqx_vm:schedulers(),
{emqx_router, start_link, []}]), {emqx_router, start_link, []}]),
{ok, {{one_for_all, 0, 1}, [Helper, RouterPool]}}. {ok, {{one_for_all, 0, 1}, [Helper, RouterPool]}}.