summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-10-25 16:53:19 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-10-25 16:53:19 +0100
commit3df41ae1e6299b65d47bcfd8eec9aafe7aa78b97 (patch)
tree4c2eca157c9683c9690f915320bb3f24a8d4a0b9
parentd76e07f23e1daadc178c699f4abe7a50a7eea9d3 (diff)
downloadrabbitmq-server-3df41ae1e6299b65d47bcfd8eec9aafe7aa78b97.tar.gz
no more magic numbers
-rw-r--r--src/rabbit_control.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index 95fd218e..3d6a62b5 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -20,7 +20,7 @@
-export([start/0, stop/0, action/5, diagnostics/1]).
-define(RPC_TIMEOUT, infinity).
--define(FILE_CHECK_INTERVAL, 1000).
+-define(EXTERNAL_CHECK_INTERVAL, 1000).
-define(QUIET_OPT, "-q").
-define(NODE_OPT, "-n").
@@ -375,7 +375,7 @@ wait_for_application(Node, Pid) ->
case process_up(Pid) of
true -> case rabbit:is_running(Node) of
true -> ok;
- false -> timer:sleep(?FILE_CHECK_INTERVAL),
+ false -> timer:sleep(?EXTERNAL_CHECK_INTERVAL),
wait_for_application(Node, Pid)
end;
false -> {error, process_not_running}
@@ -383,7 +383,7 @@ wait_for_application(Node, Pid) ->
wait_for_process_death(Pid) ->
case process_up(Pid) of
- true -> timer:sleep(?FILE_CHECK_INTERVAL),
+ true -> timer:sleep(?EXTERNAL_CHECK_INTERVAL),
wait_for_process_death(Pid);
false -> ok
end.
@@ -399,7 +399,7 @@ wait_and_read_pid_file(PidFile, Wait) ->
end,
S;
{error, enoent} -> case Wait of
- true -> timer:sleep(500),
+ true -> timer:sleep(?EXTERNAL_CHECK_INTERVAL),
wait_and_read_pid_file(PidFile, Wait);
false -> exit({error, enoent})
end;