style: cosmetic fix for code style

This commit is contained in:
Zaiming (Stone) Shi 2022-04-23 09:48:58 +02:00
parent f9fa8bb585
commit c32fc33c1a
3 changed files with 14 additions and 7 deletions

View File

@ -238,11 +238,9 @@ fields(metrics) ->
NKey = binary_to_atom(list_to_binary(Str), utf8), NKey = binary_to_atom(list_to_binary(Str), utf8),
?DESC(NKey) ?DESC(NKey)
end, end,
[{Key, mk(integer(), #{desc => ToDesc(Key), example => 0})} || Key <- Integers] [{Key, mk(integer(), #{desc => ToDesc(Key), example => 0})} || Key <- Integers] ++
++
[{Key, mk(number(), #{desc => ToDesc(Key), example => 0})} || Key <- Numbers]. [{Key, mk(number(), #{desc => ToDesc(Key), example => 0})} || Key <- Numbers].
topic(In) -> topic(In) ->
Desc = Desc =
case In of case In of

View File

@ -11,7 +11,7 @@
"\n" "\n"
"========================================================================\n" "========================================================================\n"
"Using an evaluation license limited to ~p concurrent connections.\n" "Using an evaluation license limited to ~p concurrent connections.\n"
"Apply a license at https://emqx.com/apply-licenses/emqx.\n" "Apply for a license at https://emqx.com/apply-licenses/emqx.\n"
"Or contact EMQ customer services.\n" "Or contact EMQ customer services.\n"
"========================================================================\n" "========================================================================\n"
). ).
@ -20,7 +20,7 @@
"\n" "\n"
"========================================================================\n" "========================================================================\n"
"License has been expired for ~p days.\n" "License has been expired for ~p days.\n"
"Apply a new license at https://emqx.com/apply-licenses/emqx.\n" "Apply for a new license at https://emqx.com/apply-licenses/emqx.\n"
"Or contact EMQ customer services.\n" "Or contact EMQ customer services.\n"
"========================================================================\n" "========================================================================\n"
). ).

View File

@ -11,7 +11,16 @@
-define(CHECK_INTERVAL, 5000). -define(CHECK_INTERVAL, 5000).
-define(EXPIRY_ALARM_CHECK_INTERVAL, 24 * 60 * 60). -define(EXPIRY_ALARM_CHECK_INTERVAL, 24 * 60 * 60).
-define(OK(EXPR), try _ = begin EXPR end, ok catch _:_ -> ok end). -define(OK(EXPR),
try
_ = begin
EXPR
end,
ok
catch
_:_ -> ok
end
).
-export([ -export([
start_link/1, start_link/1,