lib/karafka/web/tracking/consumers/reporter.rb in karafka-web-0.6.1 vs lib/karafka/web/tracking/consumers/reporter.rb in karafka-web-0.6.2

- old
+ new

@@ -91,15 +91,17 @@ # Reports the process state once in a while def call @running = true + # We won't track more often anyhow but want to try frequently not to miss a window + # We need to convert the sleep interval into seconds for sleep + sleep_time = ::Karafka::Web.config.tracking.interval.to_f / 1_000 / 10 + loop do report - # We won't track more often anyhow but want to try frequently not to miss a window - # We need to convert the sleep interval into seconds for sleep - sleep(::Karafka::Web.config.tracking.interval / 1_000 / 10) + sleep(sleep_time) end end # @param forced [Boolean] is this report forced. Forced means that as long as we can # flush we will flush