diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-04-30 17:29:12 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-04-30 17:29:12 +0100 |
| commit | 799f59b186094c6510675f5af76c09f9862adf5d (patch) | |
| tree | 2dd759f9f31e531f73f1136d0ed13b1ddda5eab2 /src | |
| parent | 6c0a44b866048162b44f49791305d9caab7d1800 (diff) | |
| download | rabbitmq-server-git-799f59b186094c6510675f5af76c09f9862adf5d.tar.gz | |
move queue's fhc registration from startup into init handler
so we don't do any unnecessary work in case the queue process gets
terminated before initialisation is completed
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index b59cd0740f..be4aac32ba 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -102,8 +102,6 @@ info_keys() -> ?INFO_KEYS. init(Q) -> ?LOGDEBUG("Queue starting - ~p~n", [Q]), process_flag(trap_exit, true), - ok = file_handle_cache:register_callback( - rabbit_amqqueue, set_maximum_since_use, [self()]), {ok, BQ} = application:get_env(backing_queue_module), {ok, #q{q = Q, @@ -721,6 +719,8 @@ handle_call({maybe_run_queue_via_backing_queue, Fun}, _From, State) -> handle_cast({init, Recover}, State = #q{q = #amqqueue{name = QName, durable = IsDurable}, backing_queue = BQ, backing_queue_state = undefined}) -> + ok = file_handle_cache:register_callback( + rabbit_amqqueue, set_maximum_since_use, [self()]), ok = rabbit_memory_monitor:register( self(), {rabbit_amqqueue, set_ram_duration_target, [self()]}), noreply(State#q{backing_queue_state = BQ:init(QName, IsDurable, Recover)}); |
