just to make it more readable
This commit is contained in:
parent
d6b4ff654a
commit
9c9633ab27
|
@ -471,7 +471,7 @@ print({{ClientId, _ClientPid}, SessInfo}) ->
|
||||||
"message_queue=~w, message_dropped=~w, "
|
"message_queue=~w, message_dropped=~w, "
|
||||||
"awaiting_rel=~w, awaiting_ack=~w, awaiting_comp=~w, "
|
"awaiting_rel=~w, awaiting_ack=~w, awaiting_comp=~w, "
|
||||||
"created_at=~w)~n",
|
"created_at=~w)~n",
|
||||||
[ClientId | [format(Key, proplists:get_value(Key, SessInfo)) || Key <- InfoKeys]]).
|
[ClientId | [format(Key, get_value(Key, SessInfo)) || Key <- InfoKeys]]).
|
||||||
|
|
||||||
print(topic, Topic, Records) ->
|
print(topic, Topic, Records) ->
|
||||||
Nodes = [Node || #mqtt_topic{node = Node} <- Records],
|
Nodes = [Node || #mqtt_topic{node = Node} <- Records],
|
||||||
|
|
|
@ -700,8 +700,8 @@ sess_info(#session{clean_sess = CleanSess,
|
||||||
[{clean_sess, CleanSess},
|
[{clean_sess, CleanSess},
|
||||||
{max_inflight, MaxInflight},
|
{max_inflight, MaxInflight},
|
||||||
{inflight_queue, length(InflightQueue)},
|
{inflight_queue, length(InflightQueue)},
|
||||||
{message_queue, proplists:get_value(len, Stats)},
|
{message_queue, get_value(len, Stats)},
|
||||||
{message_dropped,proplists:get_value(dropped, Stats)},
|
{message_dropped,get_value(dropped, Stats)},
|
||||||
{awaiting_rel, maps:size(AwaitingRel)},
|
{awaiting_rel, maps:size(AwaitingRel)},
|
||||||
{awaiting_ack, maps:size(AwaitingAck)},
|
{awaiting_ack, maps:size(AwaitingAck)},
|
||||||
{awaiting_comp, maps:size(AwaitingComp)},
|
{awaiting_comp, maps:size(AwaitingComp)},
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
-module(emqttd_topic).
|
-module(emqttd_topic).
|
||||||
|
|
||||||
-import(lists, [reverse/1]).
|
|
||||||
|
|
||||||
-export([match/2, validate/1, triples/1, words/1, wildcard/1]).
|
-export([match/2, validate/1, triples/1, words/1, wildcard/1]).
|
||||||
|
|
||||||
-export([join/1, feed_var/3, is_queue/1, systop/1]).
|
-export([join/1, feed_var/3, is_queue/1, systop/1]).
|
||||||
|
@ -113,7 +111,7 @@ triples(Topic) when is_binary(Topic) ->
|
||||||
triples(words(Topic), root, []).
|
triples(words(Topic), root, []).
|
||||||
|
|
||||||
triples([], _Parent, Acc) ->
|
triples([], _Parent, Acc) ->
|
||||||
reverse(Acc);
|
lists:reverse(Acc);
|
||||||
|
|
||||||
triples([W|Words], Parent, Acc) ->
|
triples([W|Words], Parent, Acc) ->
|
||||||
Node = join(Parent, W),
|
Node = join(Parent, W),
|
||||||
|
|
Loading…
Reference in New Issue