summaryrefslogtreecommitdiff
path: root/src/rabbit_connection_helper_sup.erl
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2013-10-10 10:40:54 +0100
committerTim Watson <tim@rabbitmq.com>2013-10-10 10:40:54 +0100
commitc48fa989303bd235f16c60168988818426a7d7c0 (patch)
treebc8ff91995092587bb734cf4d4681f1a257b6eb3 /src/rabbit_connection_helper_sup.erl
parent43eaf1fd45f55a7cfaf9618bc3622982d03109d5 (diff)
downloadrabbitmq-server-c48fa989303bd235f16c60168988818426a7d7c0.tar.gz
Unify the intermediate supervision tree under r_connection_helper_sup
This deprecates r_intermediate_sup and transitions the chan_sup_sup and queue collector processes into the helper sup, as well as providing an API for starting both.
Diffstat (limited to 'src/rabbit_connection_helper_sup.erl')
-rw-r--r--src/rabbit_connection_helper_sup.erl16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/rabbit_connection_helper_sup.erl b/src/rabbit_connection_helper_sup.erl
index 8f6c7698..e51615e8 100644
--- a/src/rabbit_connection_helper_sup.erl
+++ b/src/rabbit_connection_helper_sup.erl
@@ -19,7 +19,9 @@
-behaviour(supervisor2).
-export([start_link/0]).
--export([start_queue_collector/1]).
+-export([start_channel_sup_sup/1,
+ start_queue_collector/1]).
+
-export([init/1]).
-include("rabbit.hrl").
@@ -28,6 +30,7 @@
-ifdef(use_specs).
-spec(start_link/0 :: () -> rabbit_types:ok_pid_or_error()).
+-spec(start_channel_sup_sup/1 :: (pid()) -> rabbit_types:ok_pid_or_error()).
-spec(start_queue_collector/1 :: (pid()) -> rabbit_types:ok_pid_or_error()).
-endif.
@@ -36,15 +39,20 @@
start_link() ->
supervisor2:start_link(?MODULE, []).
+start_channel_sup_sup(SupPid) ->
+ supervisor2:start_child(
+ SupPid,
+ {channel_sup_sup, {rabbit_channel_sup_sup, start_link, []},
+ intrinsic, infinity, supervisor, [rabbit_channel_sup_sup]}).
+
start_queue_collector(SupPid) ->
supervisor2:start_child(
SupPid,
{collector, {rabbit_queue_collector, start_link, []},
intrinsic, ?MAX_WAIT, worker, [rabbit_queue_collector]}).
-%%--------------------------------------------------------------------------
+%%----------------------------------------------------------------------------
init([]) ->
- {ok, {{one_for_all, 0, 1}, []}}.
-
+ {ok, {{one_for_one, 10, 10}, []}}.