summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-06-11 12:50:32 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-06-11 12:50:32 +0100
commit3500f926f08349b5b13c4266e2d21c56f8010354 (patch)
tree3fb9ce9199a4473a6ca681cdbe6e548d47b50d52 /src/rabbit.erl
parentf52e46697c016767e504f49693500df8393d897f (diff)
downloadrabbitmq-server-3500f926f08349b5b13c4266e2d21c56f8010354.tar.gz
A few last clenaups
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 90181619..4901ea17 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -405,9 +405,7 @@ handle_app_error(Term) ->
end.
run_cleanup_steps(Apps) ->
- [run_step(Name, Attributes, cleanup) ||
- {App, Name, Attributes} <- find_steps(Apps),
- lists:member(App, Apps)],
+ [run_step(Name, Attrs, cleanup) || {_, Name, Attrs} <- find_steps(Apps)],
ok.
await_startup() ->
@@ -525,16 +523,12 @@ run_boot_steps() ->
run_boot_steps([App || {App, _, _} <- application:loaded_applications()]).
run_boot_steps(Apps) ->
- Steps = find_steps(Apps),
- [ok = run_step(StepName, Attributes, mfa) ||
- {_, StepName, Attributes} <- Steps],
+ [ok = run_step(Step, Attrs, mfa) || {_, Step, Attrs} <- find_steps(Apps)],
ok.
-find_steps(BaseApps) ->
- Apps = BaseApps -- [App || {App, _, _} <- rabbit_misc:which_applications()],
- FullBoot = sort_boot_steps(
- rabbit_misc:all_module_attributes(rabbit_boot_step)),
- [Step || {App, _, _} = Step <- FullBoot, lists:member(App, Apps)].
+find_steps(Apps) ->
+ All = sort_boot_steps(rabbit_misc:all_module_attributes(rabbit_boot_step)),
+ [Step || {App, _, _} = Step <- All, lists:member(App, Apps)].
run_step(StepName, Attributes, AttributeName) ->
case [MFA || {Key, MFA} <- Attributes,