fix(emqx_alarm): Wait for tables
This commit is contained in:
parent
37a1c45af0
commit
0d2d5f6bf9
|
@ -180,6 +180,7 @@ to_rfc3339(Timestamp) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
init([]) ->
|
init([]) ->
|
||||||
|
_ = mria:wait_for_tables([?ACTIVATED_ALARM, ?DEACTIVATED_ALARM]),
|
||||||
deactivate_all_alarms(),
|
deactivate_all_alarms(),
|
||||||
ok = emqx_config_handler:add_handler([alarm], ?MODULE),
|
ok = emqx_config_handler:add_handler([alarm], ?MODULE),
|
||||||
{ok, #state{timer = ensure_timer(undefined, get_validity_period())}}.
|
{ok, #state{timer = ensure_timer(undefined, get_validity_period())}}.
|
||||||
|
|
Loading…
Reference in New Issue