Skip to content

Commit 3aa744f

Browse files
Merge pull request #2246 from Ayanda-D/speedup-bootsteps
Speedup execution of bootsteps
2 parents 37cf517 + 826c211 commit 3aa744f

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

src/rabbit_boot_steps.erl

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,17 @@ find_steps(Apps) ->
4444
[Step || {App, _, _} = Step <- All, lists:member(App, Apps)].
4545

4646
run_step(Attributes, AttributeName) ->
47-
case [MFA || {Key, MFA} <- Attributes,
48-
Key =:= AttributeName] of
49-
[] ->
50-
ok;
51-
MFAs ->
52-
[begin
53-
rabbit_log:debug("Applying MFA: M = ~s, F = ~s, A = ~p",
54-
[M, F, A]),
55-
case apply(M,F,A) of
56-
ok -> ok;
57-
{error, Reason} -> exit({error, Reason})
58-
end
59-
end || {M,F,A} <- MFAs],
60-
ok
61-
end.
47+
[begin
48+
rabbit_log:debug("Applying MFA: M = ~s, F = ~s, A = ~p",
49+
[M, F, A]),
50+
case apply(M,F,A) of
51+
ok -> ok;
52+
{error, Reason} -> exit({error, Reason})
53+
end
54+
end
55+
|| {Key, {M,F,A}} <- Attributes,
56+
Key =:= AttributeName],
57+
ok.
6258

6359
vertices({AppName, _Module, Steps}) ->
6460
[{StepName, {AppName, StepName, Atts}} || {StepName, Atts} <- Steps].

0 commit comments

Comments
 (0)