|
54 | 54 | -export([update_user_state/2]).
|
55 | 55 |
|
56 | 56 | -export([init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2,
|
57 |
| - handle_info/2, handle_pre_hibernate/1, handle_post_hibernate/1, |
58 |
| - prioritise_call/4, prioritise_cast/3, prioritise_info/3, |
59 |
| - format_message_queue/2]). |
| 57 | + handle_info/2, format_status/1]). |
60 | 58 |
|
61 | 59 | %% Internal
|
62 | 60 | -export([list_local/0, emit_info_local/3, deliver_reply_local/3]).
|
@@ -555,28 +553,6 @@ init([Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol, User, VHost,
|
555 | 553 | State3 = init_tick_timer(State2),
|
556 | 554 | {ok, State3}.
|
557 | 555 |
|
558 |
| -prioritise_call(Msg, _From, _Len, _State) -> |
559 |
| - case Msg of |
560 |
| - info -> 9; |
561 |
| - {info, _Items} -> 9; |
562 |
| - _ -> 0 |
563 |
| - end. |
564 |
| - |
565 |
| -prioritise_cast(Msg, _Len, _State) -> |
566 |
| - case Msg of |
567 |
| - {confirm, _MsgSeqNos, _QPid} -> 5; |
568 |
| - {reject_publish, _MsgSeqNos, _QPid} -> 5; |
569 |
| - {queue_event, _, {confirm, _MsgSeqNos, _QPid}} -> 5; |
570 |
| - {queue_event, _, {reject_publish, _MsgSeqNos, _QPid}} -> 5; |
571 |
| - _ -> 0 |
572 |
| - end. |
573 |
| - |
574 |
| -prioritise_info(Msg, _Len, _State) -> |
575 |
| - case Msg of |
576 |
| - emit_stats -> 7; |
577 |
| - _ -> 0 |
578 |
| - end. |
579 |
| - |
580 | 556 | handle_call(flush, _From, State) ->
|
581 | 557 | reply(ok, State);
|
582 | 558 |
|
@@ -813,7 +789,13 @@ terminate(_Reason,
|
813 | 789 | code_change(_OldVsn, State, _Extra) ->
|
814 | 790 | {ok, State}.
|
815 | 791 |
|
816 |
| -format_message_queue(Opt, MQ) -> rabbit_misc:format_message_queue(Opt, MQ). |
| 792 | +format_status(Status) -> |
| 793 | + maps:map( |
| 794 | + fun(state, State = #ch{unacked_message_q = UnackedMessageQ}) -> |
| 795 | + State#ch{unacked_message_q = lqueue:len(UnackedMessageQ)}; |
| 796 | + (_,Value) -> |
| 797 | + Value |
| 798 | + end, Status). |
817 | 799 |
|
818 | 800 | get_consumer_timeout() ->
|
819 | 801 | case application:get_env(rabbit, consumer_timeout) of
|
|
0 commit comments