summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2020-02-15 04:29:29 +0300
committerGitHub <noreply@github.com>2020-02-15 04:29:29 +0300
commit3aa744ff56946e291e898bb6482248da626ea3a2 (patch)
tree2f568fdb46891cbccf5b1c7544eed6a55571cac4 /src
parent37cf5173205c0cdcf3a076331c83df23c346185c (diff)
parent826c211528bb54ea90a7b5052973ac285d3fcf52 (diff)
downloadrabbitmq-server-git-3aa744ff56946e291e898bb6482248da626ea3a2.tar.gz
Merge pull request #2246 from Ayanda-D/speedup-bootsteps
Speedup execution of bootsteps
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_boot_steps.erl26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/rabbit_boot_steps.erl b/src/rabbit_boot_steps.erl
index f3ead75415..69e34ebdec 100644
--- a/src/rabbit_boot_steps.erl
+++ b/src/rabbit_boot_steps.erl
@@ -44,21 +44,17 @@ find_steps(Apps) ->
[Step || {App, _, _} = Step <- All, lists:member(App, Apps)].
run_step(Attributes, AttributeName) ->
- case [MFA || {Key, MFA} <- Attributes,
- Key =:= AttributeName] of
- [] ->
- ok;
- MFAs ->
- [begin
- rabbit_log:debug("Applying MFA: M = ~s, F = ~s, A = ~p",
- [M, F, A]),
- case apply(M,F,A) of
- ok -> ok;
- {error, Reason} -> exit({error, Reason})
- end
- end || {M,F,A} <- MFAs],
- ok
- end.
+ [begin
+ rabbit_log:debug("Applying MFA: M = ~s, F = ~s, A = ~p",
+ [M, F, A]),
+ case apply(M,F,A) of
+ ok -> ok;
+ {error, Reason} -> exit({error, Reason})
+ end
+ end
+ || {Key, {M,F,A}} <- Attributes,
+ Key =:= AttributeName],
+ ok.
vertices({AppName, _Module, Steps}) ->
[{StepName, {AppName, StepName, Atts}} || {StepName, Atts} <- Steps].