Merge pull request #482 from emqtt/0.17
0.17.1 - Improve the design of dashboard plugin
This commit is contained in:
commit
d9654f52de
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -2,6 +2,18 @@
|
||||||
emqttd ChangeLog
|
emqttd ChangeLog
|
||||||
================
|
================
|
||||||
|
|
||||||
|
0.17.1-beta(2016-03-22)
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
Time unit of session 'expired_after' changed to minute. (#479)
|
||||||
|
|
||||||
|
### Dashboard
|
||||||
|
|
||||||
|
Code Review and improve the design of Dashboard.
|
||||||
|
|
||||||
|
|
||||||
0.17.0-beta(2016-03-15)
|
0.17.0-beta(2016-03-15)
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit c8d744ecafceae98fd570468b522f1262b7ff148
|
Subproject commit 6254ae5ab42ef5479527f5e9766fcbf0d1485540
|
|
@ -104,8 +104,8 @@
|
||||||
%% Statistics Collection Interval(seconds)
|
%% Statistics Collection Interval(seconds)
|
||||||
{collect_interval, 20},
|
{collect_interval, 20},
|
||||||
|
|
||||||
%% Expired after 2 days
|
%% Expired after 2 day (unit: minute)
|
||||||
{expired_after, 48}
|
{expired_after, 2880}
|
||||||
|
|
||||||
]},
|
]},
|
||||||
%% Queue
|
%% Queue
|
||||||
|
@ -176,11 +176,12 @@
|
||||||
|
|
||||||
%% Subscribe topics automatically when client connected
|
%% Subscribe topics automatically when client connected
|
||||||
{subscription, [
|
{subscription, [
|
||||||
%% Static subscriptions from backend
|
|
||||||
backend,
|
|
||||||
|
|
||||||
%% $c will be replaced by clientid
|
%% $c will be replaced by clientid
|
||||||
{"$queue/clients/$c", 1}
|
%% {"$queue/clients/$c", 1},
|
||||||
|
|
||||||
|
%% Static subscriptions from backend
|
||||||
|
backend
|
||||||
]}
|
]}
|
||||||
|
|
||||||
%% Rewrite rules
|
%% Rewrite rules
|
||||||
|
|
|
@ -96,8 +96,8 @@
|
||||||
%% Statistics Collection Interval(seconds)
|
%% Statistics Collection Interval(seconds)
|
||||||
{collect_interval, 0},
|
{collect_interval, 0},
|
||||||
|
|
||||||
%% Expired after 2 days
|
%% Expired after 2 day (unit: minute)
|
||||||
{expired_after, 48}
|
{expired_after, 2880}
|
||||||
|
|
||||||
]},
|
]},
|
||||||
%% Queue
|
%% Queue
|
||||||
|
@ -168,11 +168,12 @@
|
||||||
|
|
||||||
%% Subscribe topics automatically when client connected
|
%% Subscribe topics automatically when client connected
|
||||||
{subscription, [
|
{subscription, [
|
||||||
%% Static subscriptions from backend
|
|
||||||
backend,
|
|
||||||
|
|
||||||
%% $c will be replaced by clientid
|
%% $c will be replaced by clientid
|
||||||
{"$queue/clients/$c", 1}
|
%% {"$queue/clients/$c", 1},
|
||||||
|
|
||||||
|
%% Static subscriptions from backend
|
||||||
|
backend
|
||||||
]}
|
]}
|
||||||
|
|
||||||
%% Rewrite rules
|
%% Rewrite rules
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{application, emqttd,
|
{application, emqttd,
|
||||||
[
|
[
|
||||||
{description, "Erlang MQTT Broker"},
|
{description, "Erlang MQTT Broker"},
|
||||||
{vsn, "0.17.0"},
|
{vsn, "0.17.1"},
|
||||||
{id, "emqttd"},
|
{id, "emqttd"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
stack_size,
|
stack_size,
|
||||||
reductions]).
|
reductions]).
|
||||||
|
|
||||||
-define(MAX_LINES, 10000).
|
-define(MAX_LIMIT, 10000).
|
||||||
|
|
||||||
-define(APP, emqttd).
|
-define(APP, emqttd).
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ subscriptions(_) ->
|
||||||
|
|
||||||
if_could_print(Tab, Fun) ->
|
if_could_print(Tab, Fun) ->
|
||||||
case mnesia:table_info(Tab, size) of
|
case mnesia:table_info(Tab, size) of
|
||||||
Size when Size >= ?MAX_LINES ->
|
Size when Size >= ?MAX_LIMIT ->
|
||||||
?PRINT("Could not list, too many ~ss: ~p~n", [Tab, Size]);
|
?PRINT("Could not list, too many ~ss: ~p~n", [Tab, Size]);
|
||||||
_Size ->
|
_Size ->
|
||||||
Keys = mnesia:dirty_all_keys(Tab),
|
Keys = mnesia:dirty_all_keys(Tab),
|
||||||
|
|
|
@ -230,7 +230,7 @@ init([CleanSess, ClientId, ClientPid]) ->
|
||||||
retry_interval = get_value(unack_retry_interval, SessEnv),
|
retry_interval = get_value(unack_retry_interval, SessEnv),
|
||||||
await_rel_timeout = get_value(await_rel_timeout, SessEnv),
|
await_rel_timeout = get_value(await_rel_timeout, SessEnv),
|
||||||
max_awaiting_rel = get_value(max_awaiting_rel, SessEnv),
|
max_awaiting_rel = get_value(max_awaiting_rel, SessEnv),
|
||||||
expired_after = get_value(expired_after, SessEnv) * 3600,
|
expired_after = get_value(expired_after, SessEnv) * 60,
|
||||||
collect_interval = get_value(collect_interval, SessEnv, 0),
|
collect_interval = get_value(collect_interval, SessEnv, 0),
|
||||||
timestamp = os:timestamp()},
|
timestamp = os:timestamp()},
|
||||||
emqttd_sm:register_session(CleanSess, ClientId, sess_info(Session)),
|
emqttd_sm:register_session(CleanSess, ClientId, sess_info(Session)),
|
||||||
|
|
Loading…
Reference in New Issue