cluster
This commit is contained in:
parent
e5099d89eb
commit
4fb90d1e19
|
@ -68,7 +68,7 @@ cluster([SNode]) ->
|
||||||
pong ->
|
pong ->
|
||||||
application:stop(emqttd),
|
application:stop(emqttd),
|
||||||
application:stop(esockd),
|
application:stop(esockd),
|
||||||
emqtt_mnesia:cluster(Node),
|
emqttd_mnesia:cluster(Node),
|
||||||
application:start(esockd),
|
application:start(esockd),
|
||||||
application:start(emqttd),
|
application:start(emqttd),
|
||||||
?PRINT("cluster with ~p successfully.~n", [Node]);
|
?PRINT("cluster with ~p successfully.~n", [Node]);
|
||||||
|
|
|
@ -153,13 +153,13 @@ wait_for_tables() ->
|
||||||
%% Simple cluster with another nodes.
|
%% Simple cluster with another nodes.
|
||||||
%%
|
%%
|
||||||
%% @end
|
%% @end
|
||||||
%%------------------------------------------------------------------------------
|
%%--------------
|
||||||
cluster(Node) ->
|
cluster(Node) ->
|
||||||
%% stop mnesia
|
%% stop mnesia
|
||||||
mnesia:stop(),
|
mnesia:stop(),
|
||||||
ok = wait_for_mnesia(stop),
|
ok = wait_for_mnesia(stop),
|
||||||
%% delete mnesia
|
%% delete mnesia
|
||||||
ok = mnesia:delete_schema(node()),
|
ok = mnesia:delete_schema([node()]),
|
||||||
%% start mnesia
|
%% start mnesia
|
||||||
ok = mnesia:start(),
|
ok = mnesia:start(),
|
||||||
%% connect with extra_db_nodes
|
%% connect with extra_db_nodes
|
||||||
|
|
Loading…
Reference in New Issue