diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-10-25 16:53:19 +0100 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-10-25 16:53:19 +0100 |
| commit | 9043f5df575bf1f067c99afaa2eed20a998171c0 (patch) | |
| tree | 4c2eca157c9683c9690f915320bb3f24a8d4a0b9 | |
| parent | 7667ec8b557981f65d4391b30805b813b6f18002 (diff) | |
| download | rabbitmq-server-git-9043f5df575bf1f067c99afaa2eed20a998171c0.tar.gz | |
no more magic numbers
| -rw-r--r-- | src/rabbit_control.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 95fd218ed4..3d6a62b5c6 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; |
