Sha256: 97328cb80ac70cdc9ec0492e84db1721cf5b5c5c104a88d2a0a8fec472d56956

Contents?: true

Size: 294 Bytes

Versions: 2

Compression:

Stored size: 294 Bytes

Contents

require_relative '../lib/upperkut/worker'

class MyWorker
  include Upperkut::Worker

  def perform(items)
    puts "starting performing"
    exec_time = rand(90..500)
    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

2 entries across 2 versions & 1 rubygems

Version Path
upperkut-0.1.2 examples/basic.rb
upperkut-0.1.0 examples/basic.rb