commit
f7522a56b8
|
@ -36,7 +36,7 @@ spec(ChildId, Args) ->
|
|||
{ChildId, {?MODULE, start_link, Args},
|
||||
transient, infinity, supervisor, [?MODULE]}.
|
||||
|
||||
-spec(start_link(atom(), atom(), mfa()) -> {ok, pid()} | {error, any()}).
|
||||
-spec(start_link(atom() | tuple(), atom(), mfa()) -> {ok, pid()} | {error, any()}).
|
||||
start_link(Pool, Type, MFA) ->
|
||||
Schedulers = erlang:system_info(schedulers),
|
||||
start_link(Pool, Type, Schedulers, MFA).
|
||||
|
|
|
@ -109,7 +109,7 @@ add_route(Topic, Node) when is_binary(Topic), is_atom(Node) ->
|
|||
add_route(#mqtt_route{topic = Topic, node = Node}).
|
||||
|
||||
%% @doc Add Routes
|
||||
-spec(add_routes([mqtt_route()]) -> ok | {errory, Reason :: any()}).
|
||||
-spec(add_routes([mqtt_route()]) -> ok | {error, Reason :: any()}).
|
||||
add_routes(Routes) ->
|
||||
AddFun = fun() -> [add_route_(Route) || Route <- Routes] end,
|
||||
case mnesia:is_transaction() of
|
||||
|
|
Loading…
Reference in New Issue