Sha256: baa063a78a774507acbfcd31f964c70088cc990cacffedf1f9b7726bb295d961

Contents?: true

Size: 299 Bytes

Versions: 9

Compression:

Stored size: 299 Bytes

Contents

require_relative '../lib/upperkut/worker'

class MyWorker
  include Upperkut::Worker

  def perform(items)
    puts 'starting performing'
    exec_time = rand(9000..50_000)
    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

9 entries across 9 versions & 1 rubygems

Version Path
upperkut-1.0.4 examples/basic.rb
upperkut-1.0.2 examples/basic.rb
upperkut-1.0.0.rc examples/basic.rb
upperkut-0.8.1 examples/basic.rb
upperkut-0.8.0 examples/basic.rb
upperkut-0.7.5 examples/basic.rb
upperkut-0.7.4 examples/basic.rb
upperkut-0.7.2 examples/basic.rb
upperkut-0.7.1 examples/basic.rb