fix(modules): load application first for ekka_mnesia scanner
This commit is contained in:
parent
8a6f26d170
commit
49b7d870e0
|
@ -36,11 +36,14 @@ start(_Type, _Args) ->
|
||||||
set_backtrace_depth(),
|
set_backtrace_depth(),
|
||||||
print_otp_version_warning(),
|
print_otp_version_warning(),
|
||||||
print_banner(),
|
print_banner(),
|
||||||
|
%% Load application first for ekka_mnesia scanner
|
||||||
|
_ = load_ce_modules(),
|
||||||
ekka:start(),
|
ekka:start(),
|
||||||
{ok, Sup} = emqx_sup:start_link(),
|
{ok, Sup} = emqx_sup:start_link(),
|
||||||
ok = start_autocluster(),
|
ok = start_autocluster(),
|
||||||
ok = emqx_plugins:init(),
|
ok = emqx_plugins:init(),
|
||||||
_ = emqx_plugins:load(),
|
_ = emqx_plugins:load(),
|
||||||
|
_ = start_ce_modules(),
|
||||||
emqx_boot:is_enabled(listeners) andalso (ok = emqx_listeners:start()),
|
emqx_boot:is_enabled(listeners) andalso (ok = emqx_listeners:start()),
|
||||||
register(emqx, self()),
|
register(emqx, self()),
|
||||||
ok = emqx_alarm_handler:load(),
|
ok = emqx_alarm_handler:load(),
|
||||||
|
@ -58,6 +61,18 @@ set_backtrace_depth() ->
|
||||||
_ = erlang:system_flag(backtrace_depth, Depth),
|
_ = erlang:system_flag(backtrace_depth, Depth),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
-ifndef(EMQX_ENTERPRISE).
|
||||||
|
load_ce_modules() ->
|
||||||
|
application:load(emqx_modules).
|
||||||
|
start_ce_modules() ->
|
||||||
|
application:ensure_all_started(emqx_modules).
|
||||||
|
-else.
|
||||||
|
load_ce_modules() ->
|
||||||
|
ok.
|
||||||
|
start_ce_modules() ->
|
||||||
|
ok.
|
||||||
|
-endif.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Print Banner
|
%% Print Banner
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue