diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-10-27 12:44:43 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-10-27 12:44:43 +0000 |
| commit | 8c494411e88e56f60a614e196c616d36f6bbad41 (patch) | |
| tree | 4a7ab10bab621119fa1c8a7018e149a88be1a99f /src/rabbit.erl | |
| parent | c4dc225c0a2520506490ae29d01be64647ea49f7 (diff) | |
| download | rabbitmq-server-git-8c494411e88e56f60a614e196c616d36f6bbad41.tar.gz | |
make
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 215c1bc421..016a461a33 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -37,7 +37,7 @@ -export([start/2, stop/1]). --export([log_location/1]). +-export([log_location/1, start_child/2]). -import(application). -import(mnesia). @@ -67,6 +67,7 @@ {nodes, [erlang_node()]} | {running_nodes, [erlang_node()]}]). -spec(log_location/1 :: ('sasl' | 'kernel') -> log_location()). +-spec(start_child/2 :: (atom(), [any()]) -> 'ok'). -endif. @@ -155,7 +156,6 @@ start(normal, []) -> fun () -> ok = maybe_insert_default_data(), ok = rabbit_exchange:recover(), - %% TODO - this should probably use start_child somehow too DurableQueues = rabbit_amqqueue:find_durable_queues(), ok = rabbit_queue_index:start_msg_store(DurableQueues), {ok, _RealDurableQueues} = rabbit_amqqueue:recover(DurableQueues) @@ -267,8 +267,11 @@ print_banner() -> io:nl(). start_child(Mod) -> + start_child(Mod, []). + +start_child(Mod, Args) -> {ok,_} = supervisor:start_child(rabbit_sup, - {Mod, {Mod, start_link, []}, + {Mod, {Mod, start_link, Args}, transient, 5000, worker, [Mod]}), ok. |
