diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-09 16:35:39 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-09 16:35:39 +0100 |
commit | 8f4756b806d9029c297c6cdc3ea111f5a97e9085 (patch) | |
tree | e3ddd3ca4065992598f2c19ab47121911428b9a0 | |
parent | 97b2cedc18207b655a0db0b1546617634c272ce5 (diff) | |
download | rabbitmq-server-8f4756b806d9029c297c6cdc3ea111f5a97e9085.tar.gz |
Reverting rabbit_sup to not use intrinsic
-rw-r--r-- | src/rabbit_sup.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl index bf29d542..97613d17 100644 --- a/src/rabbit_sup.erl +++ b/src/rabbit_sup.erl @@ -31,7 +31,7 @@ -module(rabbit_sup). --behaviour(supervisor2). +-behaviour(supervisor). -export([start_link/0, start_child/1, start_child/2, start_child/3, start_restartable_child/1, start_restartable_child/2, stop_child/1]). @@ -43,7 +43,7 @@ -define(SERVER, ?MODULE). start_link() -> - supervisor2:start_link({local, ?SERVER}, ?MODULE, []). + supervisor:start_link({local, ?SERVER}, ?MODULE, []). start_child(Mod) -> start_child(Mod, []). @@ -52,9 +52,9 @@ start_child(Mod, Args) -> start_child(Mod, Mod, Args). start_child(ChildId, Mod, Args) -> - {ok, _} = supervisor2:start_child(?SERVER, - {ChildId, {Mod, start_link, Args}, - intrinsic, ?MAX_WAIT, worker, [Mod]}), + {ok, _} = supervisor:start_child(?SERVER, + {ChildId, {Mod, start_link, Args}, + transient, ?MAX_WAIT, worker, [Mod]}), ok. start_restartable_child(Mod) -> @@ -62,16 +62,16 @@ start_restartable_child(Mod) -> start_restartable_child(Mod, Args) -> Name = list_to_atom(atom_to_list(Mod) ++ "_sup"), - {ok, _} = supervisor2:start_child( + {ok, _} = supervisor:start_child( ?SERVER, {Name, {rabbit_restartable_sup, start_link, [Name, {Mod, start_link, Args}]}, - intrinsic, infinity, supervisor, [rabbit_restartable_sup]}), + transient, infinity, supervisor, [rabbit_restartable_sup]}), ok. stop_child(ChildId) -> - case supervisor2:terminate_child(?SERVER, ChildId) of - ok -> supervisor2:delete_child(?SERVER, ChildId); + case supervisor:terminate_child(?SERVER, ChildId) of + ok -> supervisor:delete_child(?SERVER, ChildId); E -> E end. |