diff options
author | Matthias Radestock <matthias@lshift.net> | 2010-04-16 14:33:17 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2010-04-16 14:33:17 +0100 |
commit | 38f3d48bdf4e8ef9919af0e380e1925ffb503c8f (patch) | |
tree | b6f23d9a1588d7310d10975be1e891f0d4670255 | |
parent | f48db4a0bbbe15ab62922b309a2ac89af3e9a2fb (diff) | |
download | rabbitmq-server-38f3d48bdf4e8ef9919af0e380e1925ffb503c8f.tar.gz |
qa supervisor2 and its use in amqqueue/amqqueue_sup
Queue processes are now terminated nicely (and the supervisor waits
for the termination), but this won't make any difference until queue
processes trap exits and do something interesting on shutdown.
-rw-r--r-- | src/rabbit_amqqueue_sup.erl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue_sup.erl b/src/rabbit_amqqueue_sup.erl index dbd65780..97d6cef9 100644 --- a/src/rabbit_amqqueue_sup.erl +++ b/src/rabbit_amqqueue_sup.erl @@ -31,21 +31,23 @@ -module(rabbit_amqqueue_sup). --behaviour(supervisor). +-behaviour(supervisor2). -export([start_link/0, start_child/1]). -export([init/1]). +-include("rabbit.hrl"). + -define(SERVER, ?MODULE). start_link() -> - supervisor:start_link({local, ?SERVER}, ?MODULE, []). + supervisor2:start_link({local, ?SERVER}, ?MODULE, []). start_child(Args) -> - supervisor:start_child(?SERVER, Args). + supervisor2:start_child(?SERVER, Args). init([]) -> - {ok, {{simple_one_for_one, 10, 10}, + {ok, {{simple_one_for_one_terminate, 10, 10}, [{rabbit_amqqueue, {rabbit_amqqueue_process, start_link, []}, - temporary, brutal_kill, worker, [rabbit_amqqueue_process]}]}}. + temporary, ?MAX_WAIT, worker, [rabbit_amqqueue_process]}]}}. |