Skip to content

Commit

Permalink
Invert comparisson to trick robocop
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonfournier committed Dec 10, 2024
1 parent ceb4de6 commit 3d875c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unleash/metrics_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d875c2

Please sign in to comment.