|
@@ -923,7 +923,6 @@ end}.
|
|
|
%% of queued MQTT messages of QoS 1 and 2.
|
|
%% of queued MQTT messages of QoS 1 and 2.
|
|
|
%% Zero or negative is to disable.
|
|
%% Zero or negative is to disable.
|
|
|
{mapping, "zone.$name.force_shutdown_policy", "emqx.zones", [
|
|
{mapping, "zone.$name.force_shutdown_policy", "emqx.zones", [
|
|
|
- {default, "default"},
|
|
|
|
|
{datatype, string}
|
|
{datatype, string}
|
|
|
]}.
|
|
]}.
|
|
|
|
|
|
|
@@ -963,17 +962,6 @@ end}.
|
|
|
count => list_to_integer(Count)}
|
|
count => list_to_integer(Count)}
|
|
|
end,
|
|
end,
|
|
|
{force_gc_policy, GcPolicy};
|
|
{force_gc_policy, GcPolicy};
|
|
|
- ("force_shutdown_policy", "default") ->
|
|
|
|
|
- {DefaultLen, DefaultSize} =
|
|
|
|
|
- case WordSize = erlang:system_info(wordsize) of
|
|
|
|
|
- 8 -> % arch_64
|
|
|
|
|
- {10000, cuttlefish_bytesize:parse("32MB")};
|
|
|
|
|
- 4 -> % arch_32
|
|
|
|
|
- {10000, cuttlefish_bytesize:parse("16MB")}
|
|
|
|
|
- end,
|
|
|
|
|
- {force_shutdown_policy, #{message_queue_len => DefaultLen,
|
|
|
|
|
- max_heap_size => DefaultSize div WordSize
|
|
|
|
|
- }};
|
|
|
|
|
("force_shutdown_policy", Val) ->
|
|
("force_shutdown_policy", Val) ->
|
|
|
[Len, Siz] = string:tokens(Val, "| "),
|
|
[Len, Siz] = string:tokens(Val, "| "),
|
|
|
MaxSiz = case WordSize = erlang:system_info(wordsize) of
|
|
MaxSiz = case WordSize = erlang:system_info(wordsize) of
|