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,
|
||||
modules => [emqx_retainer]} || not is_managed_by_modules()]}}.
|
||||
|
||||
%% This function is added to enterprise branch only.
|
||||
%% In enterprise edition, the retainer worker may start under modules supervisor
|
||||
%% so we should avoid starting it under the application root supervisor.
|
||||
-ifdef(EMQX_ENTERPRISE).
|
||||
|
||||
is_managed_by_modules() ->
|
||||
try
|
||||
case supervisor:get_childspec(emqx_modules_sup, emqx_retainer) of
|
||||
|
@ -47,3 +46,11 @@ is_managed_by_modules() ->
|
|||
exit : {noproc, _} ->
|
||||
false
|
||||
end.
|
||||
|
||||
-else.
|
||||
|
||||
is_managed_by_modules() ->
|
||||
%% always false for opensource edition
|
||||
false.
|
||||
|
||||
-endif.
|
||||
|
|
Loading…
Reference in New Issue