diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2011-03-30 12:45:54 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-03-30 12:45:54 +0100 |
commit | 1312b972cf32478b68223af795a40c979e65b4d3 (patch) | |
tree | a5c2477c4926c2bf1139278e369631eff3a90fdf /src/rabbit_control.erl | |
parent | 92e9e3748a98d2f76f22cabae854772c168c5637 (diff) | |
download | rabbitmq-server-1312b972cf32478b68223af795a40c979e65b4d3.tar.gz |
cosmetic: put 'rabbitmqctl wait' code in the right place
Diffstat (limited to 'src/rabbit_control.erl')
-rw-r--r-- | src/rabbit_control.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 571eb5e4..4a2858f0 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -127,6 +127,8 @@ usage() -> io:format("~s", [rabbit_ctl_usage:usage()]), quit(1). +%%---------------------------------------------------------------------------- + action(stop, Node, [], _Opts, Inform) -> Inform("Stopping and halting node ~p", [Node]), call(Node, {rabbit, stop_and_halt, []}); @@ -159,6 +161,10 @@ action(force_cluster, Node, ClusterNodeSs, _Opts, Inform) -> [Node, ClusterNodes]), rpc_call(Node, rabbit_mnesia, force_cluster, [ClusterNodes]); +action(wait, Node, [], _Opts, Inform) -> + Inform("Waiting for ~p", [Node]), + wait_for_application(Node, ?WAIT_FOR_VM_ATTEMPTS). + action(status, Node, [], _Opts, Inform) -> Inform("Status of node ~p", [Node]), case call(Node, {rabbit, status, []}) of @@ -294,9 +300,7 @@ action(list_permissions, Node, [], Opts, Inform) -> display_list(call(Node, {rabbit_auth_backend_internal, list_vhost_permissions, [VHost]})); -action(wait, Node, [], _Opts, Inform) -> - Inform("Waiting for ~p", [Node]), - wait_for_application(Node, ?WAIT_FOR_VM_ATTEMPTS). +%%---------------------------------------------------------------------------- wait_for_application(Node, Attempts) -> case rpc_call(Node, application, which_applications, [infinity]) of |