mirror of
https://github.com/valitydev/dmt-client.git
synced 2024-11-06 01:15:22 +00:00
fix: Fix cleanup interval options
This commit is contained in:
parent
8a224b81f8
commit
b3b5c30828
@ -15,6 +15,7 @@
|
||||
]},
|
||||
{cache_update_interval, 5000}, % milliseconds
|
||||
{cache_update_pull_limit, 10}, % event batch size
|
||||
{cache_cleanup_interval, 5000}, % milliseconds
|
||||
{max_cache_size, #{
|
||||
elements => 20,
|
||||
memory => 52428800 % 50Mb
|
||||
|
@ -481,7 +481,7 @@ restart_update_timer(State = #state{update_timer = TimerRef}) ->
|
||||
-spec restart_cleanup_timer(state()) -> state().
|
||||
restart_cleanup_timer(State = #state{cleanup_timer = TimerRef}) ->
|
||||
cancel_timer(TimerRef),
|
||||
Interval = genlib_app:env(dmt_client, cache_update_interval, ?DEFAULT_CLEANUP_INTERVAL),
|
||||
Interval = genlib_app:env(dmt_client, cache_cleanup_interval, ?DEFAULT_CLEANUP_INTERVAL),
|
||||
State#state{cleanup_timer = erlang:send_after(Interval, self(), {cleanup_timer, timeout})}.
|
||||
|
||||
cancel_timer(undefined) ->
|
||||
|
Loading…
Reference in New Issue
Block a user