Sha256: 494135b31bca7fd28b1ff0ca11a2dda717522b3e89b8cc73edbff9a02fd38589

Contents?: true

Size: 298 Bytes

Versions: 12

Compression:

Stored size: 298 Bytes

Contents

require_relative '../lib/upperkut/worker'

class MyWorker
  include Upperkut::Worker

  def perform(items)
    puts 'starting performing'
    exec_time = rand(9000..50000)
    sleep (exec_time.to_f / 1000.to_f)
    puts "performed #{items.size} items in #{exec_time.to_f / 1000.to_f} ms"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
upperkut-0.7.0 examples/basic.rb
upperkut-0.6.0 examples/basic.rb
upperkut-0.5.2 examples/basic.rb
upperkut-0.5.1 examples/basic.rb
upperkut-0.5.0 examples/basic.rb
upperkut-0.4.6 examples/basic.rb
upperkut-0.4.5 examples/basic.rb
upperkut-0.4.4 examples/basic.rb
upperkut-0.4.3 examples/basic.rb
upperkut-0.4.2 examples/basic.rb
upperkut-0.4.1 examples/basic.rb
upperkut-0.4.0 examples/basic.rb