Method: StatsThread#initialize
- Defined in:
- lib/yodel/task_queue/stats_thread.rb
#initialize ⇒ StatsThread
Returns a new instance of StatsThread.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/yodel/task_queue/stats_thread.rb', line 4 def initialize @processed = 0 @running = true Thread.new do while @running sleep(PERIOD) puts "Processed #{@processed} tasks" @processed = 0 end end end |