diff options
| author | Michael Bridgen <mikeb@lshift.net> | 2010-01-29 17:39:22 +0000 |
|---|---|---|
| committer | Michael Bridgen <mikeb@lshift.net> | 2010-01-29 17:39:22 +0000 |
| commit | 98d1db4b65ec61265874247b2c4322ed7f316253 (patch) | |
| tree | 77c72994de62ac8eb532e8683877a8d252b2c71b /src/rabbit.erl | |
| parent | bc586033a279ffc7c18b40be1865d4867f94241d (diff) | |
| parent | b22d7975219f1260b22431950ce1206aab2fdba0 (diff) | |
| download | rabbitmq-server-git-98d1db4b65ec61265874247b2c4322ed7f316253.tar.gz | |
Merge from default to get an abundance of fixes; including (this is the
only non-conflict resolution) pre->enables and post->requires.
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 569bdb1fb6..9fdef96bba 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -51,22 +51,22 @@ -rabbit_boot_step({database, [{mfa, {rabbit_mnesia, init, []}}, - {pre, kernel_ready}]}). + {enables, kernel_ready}]}). -rabbit_boot_step({rabbit_exchange_type, [{description, "exchange type registry"}, {mfa, {rabbit_sup, start_child, [rabbit_exchange_type]}}, - {pre, kernel_ready}]}). + {enables, kernel_ready}]}). -rabbit_boot_step({rabbit_log, [{description, "logging server"}, {mfa, {rabbit_sup, start_child, [rabbit_log]}}, - {pre, kernel_ready}]}). + {enables, kernel_ready}]}). -rabbit_boot_step({rabbit_hooks, [{description, "internal event notification system"}, {mfa, {rabbit_hooks, start, []}}, - {pre, kernel_ready}]}). + {enables, kernel_ready}]}). -rabbit_boot_step({kernel_ready, [{description, "kernel ready"}]}). @@ -74,27 +74,27 @@ -rabbit_boot_step({rabbit_alarm, [{description, "alarm handler"}, {mfa, {rabbit_alarm, start, []}}, - {post, kernel_ready}, - {pre, core_initialized}]}). + {requires, kernel_ready}, + {enables, core_initialized}]}). -rabbit_boot_step({rabbit_amqqueue_sup, [{description, "queue supervisor"}, {mfa, {rabbit_amqqueue, start, []}}, - {post, kernel_ready}, - {pre, core_initialized}]}). + {requires, kernel_ready}, + {enables, core_initialized}]}). -rabbit_boot_step({rabbit_router, [{description, "cluster router"}, {mfa, {rabbit_sup, start_child, [rabbit_router]}}, - {post, kernel_ready}, - {pre, core_initialized}]}). + {requires, kernel_ready}, + {enables, core_initialized}]}). -rabbit_boot_step({rabbit_node_monitor, [{description, "node monitor"}, {mfa, {rabbit_sup, start_child, [rabbit_node_monitor]}}, - {post, kernel_ready}, - {post, rabbit_amqqueue_sup}, - {pre, core_initialized}]}). + {requires, kernel_ready}, + {requires, rabbit_amqqueue_sup}, + {enables, core_initialized}]}). -rabbit_boot_step({core_initialized, [{description, "core initialized"}]}). @@ -102,27 +102,27 @@ -rabbit_boot_step({empty_db_check, [{description, "empty DB check"}, {mfa, {?MODULE, maybe_insert_default_data, []}}, - {post, core_initialized}]}). + {requires, core_initialized}]}). -rabbit_boot_step({exchange_recovery, [{description, "exchange recovery"}, {mfa, {rabbit_exchange, recover, []}}, - {post, empty_db_check}]}). + {requires, empty_db_check}]}). -rabbit_boot_step({queue_recovery, [{description, "queue recovery"}, {mfa, {rabbit_amqqueue, recover, []}}, - {post, exchange_recovery}]}). + {requires, exchange_recovery}]}). -rabbit_boot_step({persister, [{mfa, {rabbit_sup, start_child, [rabbit_persister]}}, - {post, queue_recovery}]}). + {requires, queue_recovery}]}). -rabbit_boot_step({guid_generator, [{description, "guid generator"}, {mfa, {rabbit_sup, start_child, [rabbit_guid]}}, - {post, persister}, - {pre, routing_ready}]}). + {requires, persister}, + {enables, routing_ready}]}). -rabbit_boot_step({routing_ready, [{description, "message delivery logic ready"}]}). @@ -130,12 +130,12 @@ -rabbit_boot_step({log_relay, [{description, "error log relay"}, {mfa, {rabbit_error_logger, boot, []}}, - {post, routing_ready}]}). + {requires, routing_ready}]}). -rabbit_boot_step({networking, [{mfa, {rabbit_networking, boot, []}}, - {post, log_relay}, - {pre, networking_listening}]}). + {requires, log_relay}, + {enables, networking_listening}]}). -rabbit_boot_step({networking_listening, [{description, "network listeners available"}]}). @@ -251,9 +251,9 @@ run_boot_step({StepName, Attributes}) -> end, case [MFA || {mfa, MFA} <- Attributes] of [] -> - io:format("progress -- ~s~n", [Description]); + io:format("-- ~s~n", [Description]); MFAs -> - io:format("starting ~-40s ...", [Description]), + io:format("starting ~-60s ...", [Description]), [case catch apply(M,F,A) of {'EXIT', Reason} -> boot_error("FAILED~nReason: ~p~n", [Reason]); @@ -291,9 +291,9 @@ sort_boot_steps(UnsortedSteps) -> %% Add edges, detecting cycles and missing vertices. lists:foreach(fun ({StepName, Attributes}) -> [add_boot_step_dep(G, StepName, PrecedingStepName) - || {post, PrecedingStepName} <- Attributes], + || {requires, PrecedingStepName} <- Attributes], [add_boot_step_dep(G, SucceedingStepName, StepName) - || {pre, SucceedingStepName} <- Attributes] + || {enables, SucceedingStepName} <- Attributes] end, UnsortedSteps), %% Use topological sort to find a consistent ordering (if there is |
