From 3d875c2a419a2c82d7b479ca34361dfa9ffd0c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 10 Dec 2024 11:17:11 +0100 Subject: [PATCH] Invert comparisson to trick robocop --- lib/unleash/metrics_reporter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unleash/metrics_reporter.rb b/lib/unleash/metrics_reporter.rb index 4b6c217..e7c9de3 100755 --- a/lib/unleash/metrics_reporter.rb +++ b/lib/unleash/metrics_reporter.rb @@ -32,7 +32,7 @@ def post Unleash.logger.debug "post() Report" bucket = self.generate_report - if bucket.nil? && !(Time.now - self.last_time < LONGEST_WITHOUT_A_REPORT) # and last time is less then 10 minutes... + if bucket.nil? && (Time.now - self.last_time >= LONGEST_WITHOUT_A_REPORT) # and last time is less then 10 minutes... Unleash.logger.debug "Report not posted to server, as it would have been empty. (and has been empty for up to 10 min)" return