diff options
| author | John DeTreville <jdetreville@vmware.com> | 2011-02-08 16:21:17 -0800 |
|---|---|---|
| committer | John DeTreville <jdetreville@vmware.com> | 2011-02-08 16:21:17 -0800 |
| commit | 41f4a7f7963faa9cfcfe1124d34ca337efe2a48d (patch) | |
| tree | 95cab71666bce7c27808704f241625250dc23d09 | |
| parent | f793796dcf5a5e2ed91eeab012e3a6ddfcd9fe73 (diff) | |
| download | rabbitmq-server-git-41f4a7f7963faa9cfcfe1124d34ca337efe2a48d.tar.gz | |
All tests pass.
| -rw-r--r-- | src/rabbit_amqqueue.erl | 5 | ||||
| -rw-r--r-- | src/rabbit_channel.erl | 11 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index a6da551d15..dc3f249aef 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -27,7 +27,6 @@ check_exclusive_access/2, with_exclusive_access_or_die/3, stat/1, deliver/2, requeue/3, ack/4, reject/4]). -export([list/1, info_keys/0, info/1, info/2, info_all/1, info_all/2]). --export([emit_stats/1]). -export([consumers/1, consumers_all/1]). -export([basic_get/3, basic_consume/7, basic_cancel/4]). -export([notify_sent/2, unblock/2, flush_all/2]). @@ -97,7 +96,6 @@ -spec(stat/1 :: (rabbit_types:amqqueue()) -> {'ok', non_neg_integer(), non_neg_integer()}). --spec(emit_stats/1 :: (rabbit_types:amqqueue()) -> 'ok'). -spec(delete_immediately/1 :: (rabbit_types:amqqueue()) -> 'ok'). -spec(delete/3 :: (rabbit_types:amqqueue(), 'false', 'false') @@ -358,9 +356,6 @@ consumers_all(VHostPath) -> stat(#amqqueue{pid = QPid}) -> delegate_call(QPid, stat, infinity). -emit_stats(#amqqueue{pid = QPid}) -> - delegate_cast(QPid, emit_stats). - delete_immediately(#amqqueue{ pid = QPid }) -> gen_server2:cast(QPid, delete_immediately). diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 1c4c1631b0..eb80e43781 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -265,11 +265,6 @@ handle_cast({deliver, ConsumerTag, AckRequired, end, State), noreply(State1#ch{next_tag = DeliveryTag + 1}); -handle_cast(emit_stats, State = #ch{stats_timer = StatsTimer}) -> - internal_emit_stats(State), - noreply([ensure_stats_timer], - State#ch{stats_timer = rabbit_event:reset_stats_timer(StatsTimer)}); - handle_cast({confirm, MsgSeqNos, From}, State) -> State1 = #ch{confirmed = C} = confirm(MsgSeqNos, From, State), noreply([send_confirms], State1, case C of [] -> hibernate; _ -> 0 end). @@ -277,6 +272,12 @@ handle_cast({confirm, MsgSeqNos, From}, State) -> handle_info(timeout, State) -> noreply(State); +handle_info(emit_stats, State = #ch{stats_timer = StatsTimer}) -> + internal_emit_stats(State), + noreply([ensure_stats_timer], + State#ch{ + stats_timer = rabbit_event:reset_stats_timer(StatsTimer)}); + handle_info({'DOWN', _MRef, process, QPid, Reason}, State = #ch{unconfirmed = UC}) -> %% TODO: this does a complete scan and partial rebuild of the |
