summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-04-16 15:54:00 +0100
committerMatthew Sackman <matthew@lshift.net>2010-04-16 15:54:00 +0100
commitb53e55cfc5e96834325b38dc75bb107f417f242b (patch)
treeb54666655cb3386b9a0b5471ba402bffd2a35b6b
parentcf5688e4c5ceaf3e8e176126732206fcd08db279 (diff)
parentdab4d70c7c600b833ee1d05c39e5fa0e9b126a26 (diff)
downloadrabbitmq-server-git-b53e55cfc5e96834325b38dc75bb107f417f242b.tar.gz
Merging heads
-rw-r--r--src/rabbit_amqqueue.erl3
-rw-r--r--src/rabbit_amqqueue_sup.erl5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 3ca39e108f..9406008e29 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -213,8 +213,7 @@ store_queue(Q = #amqqueue{durable = false}) ->
ok.
start_queue_process(Q, InitBackingQueue) ->
- {ok, Pid} =
- supervisor2:start_child(rabbit_amqqueue_sup, [Q, InitBackingQueue]),
+ {ok, Pid} = rabbit_amqqueue_sup:start_child([Q, InitBackingQueue]),
Q#amqqueue{pid = Pid}.
add_default_binding(#amqqueue{name = QueueName}) ->
diff --git a/src/rabbit_amqqueue_sup.erl b/src/rabbit_amqqueue_sup.erl
index f30c9fd5e6..97d6cef9c2 100644
--- a/src/rabbit_amqqueue_sup.erl
+++ b/src/rabbit_amqqueue_sup.erl
@@ -33,7 +33,7 @@
-behaviour(supervisor2).
--export([start_link/0]).
+-export([start_link/0, start_child/1]).
-export([init/1]).
@@ -44,6 +44,9 @@
start_link() ->
supervisor2:start_link({local, ?SERVER}, ?MODULE, []).
+start_child(Args) ->
+ supervisor2:start_child(?SERVER, Args).
+
init([]) ->
{ok, {{simple_one_for_one_terminate, 10, 10},
[{rabbit_amqqueue, {rabbit_amqqueue_process, start_link, []},