fix(exclusive): add upgarde API && fix description error

This commit is contained in:
firest 2022-06-30 09:48:30 +08:00
parent b1b1d40528
commit 5981a23fe4
2 changed files with 16 additions and 3 deletions

View File

@ -757,11 +757,11 @@ mqtt 下所有的配置作为全局的默认值存在,它可以被 <code>zone<
mqtt_exclusive_subscription {
desc {
en: """Whether to enable support for MQTT exclusive subscription."""
zh: """是否启用对 MQTT 独占订阅的支持。"""
zh: """是否启用对 MQTT 排它订阅的支持。"""
}
label: {
en: """Exclusive Subscription Available"""
zh: """独占订阅可用"""
en: """Exclusive Subscription"""
zh: """排它订阅"""
}
}

View File

@ -24,6 +24,9 @@
%% Mnesia bootstrap
-export([mnesia/1]).
%% For upgrade
-export([on_add_module/0, on_delete_module/0]).
-boot_mnesia({mnesia, [boot]}).
-copy_mnesia({mnesia, [copy]}).
@ -61,6 +64,16 @@ mnesia(boot) ->
]),
ok = mria_rlog:wait_for_shards([?EXCLUSIVE_SHARD], infinity).
%%--------------------------------------------------------------------
%% Upgrade
%%--------------------------------------------------------------------
on_add_module() ->
mnesia(boot).
on_delete_module() ->
mria:clear_table(?EXCLUSIVE_SHARD).
%%--------------------------------------------------------------------
%% APIs
%%--------------------------------------------------------------------