refactor(config): change global_gc_interval to ms
This commit is contained in:
parent
34382cacab
commit
048ba1e067
|
@ -87,7 +87,7 @@ code_change(_OldVsn, State, _Extra) ->
|
|||
ensure_timer(State) ->
|
||||
case emqx_config:get([node, global_gc_interval]) of
|
||||
undefined -> State;
|
||||
Interval -> TRef = emqx_misc:start_timer(timer:seconds(Interval), run),
|
||||
Interval -> TRef = emqx_misc:start_timer(Interval, run),
|
||||
State#{timer := TRef}
|
||||
end.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
all() -> emqx_ct:all(?MODULE).
|
||||
|
||||
t_run_gc(_) ->
|
||||
ok = emqx_config:put([node, global_gc_interval], 1),
|
||||
ok = emqx_config:put([node, global_gc_interval], 1000),
|
||||
{ok, _} = emqx_global_gc:start_link(),
|
||||
ok = timer:sleep(1500),
|
||||
{ok, MilliSecs} = emqx_global_gc:run(),
|
||||
|
|
Loading…
Reference in New Issue