Always init pubsub_index when using mnesia

This commit is contained in:
Christophe Romain 2017-04-03 12:13:03 +02:00
parent 19614678e9
commit b75780b9cd
1 changed files with 4 additions and 0 deletions

View File

@ -256,6 +256,10 @@ init([ServerHost, Opts]) ->
fun(A) when is_integer(A) andalso A >= 0 -> A end, ?MAXITEMS),
MaxSubsNode = gen_mod:get_opt(max_subscriptions_node, Opts,
fun(A) when is_integer(A) andalso A >= 0 -> A end, undefined),
case gen_mod:db_type(ServerHost, ?MODULE) of
mnesia -> pubsub_index:init(Host, ServerHost, Opts);
_ -> ok
end,
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
DefaultModule = plugin(Host, hd(Plugins)),
BaseOptions = DefaultModule:options(),