fix(emqx_alarm): Wait for tables

This commit is contained in:
k32 2021-10-18 22:09:48 +02:00 committed by x1001100011
parent 760d896d9d
commit fca7fd755d
1 changed files with 1 additions and 0 deletions

View File

@ -180,6 +180,7 @@ to_rfc3339(Timestamp) ->
%%--------------------------------------------------------------------
init([]) ->
_ = mria:wait_for_tables([?ACTIVATED_ALARM, ?DEACTIVATED_ALARM]),
deactivate_all_alarms(),
ok = emqx_config_handler:add_handler([alarm], ?MODULE),
{ok, #state{timer = ensure_timer(undefined, get_validity_period())}}.