lib/fusuma/plugin/buffers/timer_buffer.rb in fusuma-2.0.4 vs lib/fusuma/plugin/buffers/timer_buffer.rb in fusuma-2.0.5
- old
+ new
@@ -6,11 +6,11 @@
module Plugin
module Buffers
# manage events and generate command
class TimerBuffer < Buffer
DEFAULT_SOURCE = 'timer_input'
- DEFAULT_SECONDS_TO_KEEP = 60
+ DEFAULT_SECONDS_TO_KEEP = 3
def config_param_types
{
source: [String],
seconds_to_keep: [Float, Integer]
@@ -28,11 +28,9 @@
def clear_expired(current_time: Time.now)
@seconds_to_keep ||= (config_params(:seconds_to_keep) || DEFAULT_SECONDS_TO_KEEP)
@events.each do |e|
break if current_time - e.time < @seconds_to_keep
-
- MultiLogger.debug("#{self.class.name}##{__method__}")
@events.delete(e)
end
end