summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2012-05-16 09:19:12 +0100
committerTim Watson <tim@rabbitmq.com>2012-05-16 09:19:12 +0100
commitcaf1587e03c8bad21ed8f3ed88b3991e35bcc56a (patch)
tree1e496bc2fb436fe98ce677575f69013d8486bd4c
parent693da5ef02e18c9652396e3335c5bd7e3e0d4889 (diff)
downloadrabbitmq-server-git-caf1587e03c8bad21ed8f3ed88b3991e35bcc56a.tar.gz
rename bootstrap_environment to prepare_plugins; fix while_process_is_alive activity call
-rw-r--r--src/rabbit.erl2
-rw-r--r--src/rabbit_control.erl6
-rw-r--r--src/rabbit_plugins.erl8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index f735fbea80..312960583a 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -306,7 +306,7 @@ start() ->
boot() ->
start_it(fun() ->
ok = prepare(),
- Plugins = rabbit_plugins:bootstrap_envinronment(),
+ Plugins = rabbit_plugins:prepare_plugins(),
ToBeLoaded = Plugins ++ ?APPS,
ok = app_utils:load_applications(ToBeLoaded),
StartupApps = app_utils:app_dependency_order(ToBeLoaded, false),
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index 0e9e034a61..6dc8d445dd 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -411,12 +411,12 @@ wait_for_application(Node, Pid, Application) ->
wait_for_startup(Node, Pid) ->
while_process_is_alive(Node, Pid,
- fun() -> rpc:call(Node, rabbit, await_startup, []) end).
+ fun() -> rpc:call(Node, rabbit, await_startup, []) =:= ok end).
while_process_is_alive(Node, Pid, Activity) ->
case process_up(Pid) of
- true -> case Activity(Node) of
- ok -> ok;
+ true -> case Activity() of
+ true -> ok;
Other -> timer:sleep(?EXTERNAL_CHECK_INTERVAL),
while_process_is_alive(Node, Pid, Activity)
end;
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl
index 0ab0d3aa2a..8a8e7052db 100644
--- a/src/rabbit_plugins.erl
+++ b/src/rabbit_plugins.erl
@@ -17,7 +17,7 @@
-module(rabbit_plugins).
-include("rabbit.hrl").
--export([start/0, stop/0, bootstrap_envinronment/0, active_plugins/0]).
+-export([start/0, stop/0, prepare_plugins/0, active_plugins/0]).
-define(VERBOSE_OPT, "-v").
-define(MINIMAL_OPT, "-m").
@@ -30,7 +30,7 @@
-spec(start/0 :: () -> no_return()).
-spec(stop/0 :: () -> 'ok').
--spec(bootstrap_envinronment/0 :: () -> [atom()]).
+-spec(prepare_plugins/0 :: () -> [atom()]).
-spec(active_plugins/0 :: () -> [atom()]).
-endif.
@@ -80,13 +80,13 @@ start() ->
stop() ->
ok.
-bootstrap_envinronment() ->
+prepare_plugins() ->
{ok, PluginDir} = application:get_env(rabbit, plugins_dir),
{ok, ExpandDir} = application:get_env(rabbit, plugins_expand_dir),
{ok, EnabledPluginsFile} = application:get_env(rabbit,
enabled_plugins_file),
prepare_plugins(EnabledPluginsFile, PluginDir, ExpandDir),
- [prepare_dir_plugin(PluginName) ||
+ [prepare_dir_plugin(PluginName) ||
PluginName <- filelib:wildcard(ExpandDir ++ "/*/ebin/*.app")].
active_plugins() ->