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 | b286b0c5793e30e8b22d04f3c79bf3a70eac9e71 (patch) | |
| tree | b6f23d9a1588d7310d10975be1e891f0d4670255 /src | |
| parent | 77001fd4df8f02954d3c3c24ef636f997c228aab (diff) | |
| download | rabbitmq-server-git-b286b0c5793e30e8b22d04f3c79bf3a70eac9e71.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.
Diffstat (limited to 'src')
| -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 dbd65780fb..97d6cef9c2 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]}]}}. |
