lib/fusuma/plugin/detectors/rotate_detector.rb in fusuma-1.4.0 vs lib/fusuma/plugin/detectors/rotate_detector.rb in fusuma-1.4.1
- old
+ new
@@ -61,16 +61,12 @@
quantity > threshold(index: index)
end
def enough_interval?(index:)
return true if first_time?
- return true if (Time.now - @last_time) > interval_time(index: index)
+ return true if (Time.now - last_time) > interval_time(index: index)
false
- end
-
- def first_time?
- !@last_time
end
def threshold(index:)
@threshold ||= {}
@threshold[index.cache_key] ||= begin