lib/drone/metrics/meter.rb in drone-1.0.8 vs lib/drone/metrics/meter.rb in drone-1.0.9
- old
+ new
@@ -23,12 +23,10 @@
1 => EWMA.one_minute_ewma("#{name}:rate1"),
5 => EWMA.five_minutes_ewma("#{name}:rate5"),
15 => EWMA.fifteen_minutes_ewma("#{name}:rate15")
}
- Drone::schedule_periodic(INTERVAL) do
- Fiber.new{ tick() }.resume
- end
+ Drone::schedule_periodic(INTERVAL, &method(:tick))
end
def tick
# init if required
@local_next_tick ||= @next_tick.get