chore: restore apps/emqx_retainer/src/emqx_retainer_sup.erl
this file, ce should be copied to ee, not the other way around
This commit is contained in:
parent
f818a78d29
commit
c5bbac0a23
|
@ -34,9 +34,8 @@ init([Env]) ->
|
||||||
type => worker,
|
type => worker,
|
||||||
modules => [emqx_retainer]} || not is_managed_by_modules()]}}.
|
modules => [emqx_retainer]} || not is_managed_by_modules()]}}.
|
||||||
|
|
||||||
%% This function is added to enterprise branch only.
|
-ifdef(EMQX_ENTERPRISE).
|
||||||
%% In enterprise edition, the retainer worker may start under modules supervisor
|
|
||||||
%% so we should avoid starting it under the application root supervisor.
|
|
||||||
is_managed_by_modules() ->
|
is_managed_by_modules() ->
|
||||||
try
|
try
|
||||||
case supervisor:get_childspec(emqx_modules_sup, emqx_retainer) of
|
case supervisor:get_childspec(emqx_modules_sup, emqx_retainer) of
|
||||||
|
@ -47,3 +46,11 @@ is_managed_by_modules() ->
|
||||||
exit : {noproc, _} ->
|
exit : {noproc, _} ->
|
||||||
false
|
false
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
-else.
|
||||||
|
|
||||||
|
is_managed_by_modules() ->
|
||||||
|
%% always false for opensource edition
|
||||||
|
false.
|
||||||
|
|
||||||
|
-endif.
|
||||||
|
|
Loading…
Reference in New Issue