29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/config_o_mat/configurator/op/next_tick.rb', line 29
def call
self.run_count += 1
SdNotify.watchdog
if gc_compact > 0 && run_count % gc_compact == 0
response = GC.compact
logger&.info(:gc_compact, compact: response)
end
if gc_stat > 0 && run_count % gc_stat == 0
response = GC.stat
logger&.info(:gc_stat, stat: response)
end
self.retries_left = retry_count
Kernel.sleep PAUSE_INTERVAL
if Time.now.to_i - last_refresh_time > refresh_interval
self.next_state = :refreshing_profiles
else
self.next_state = :running
end
end
|