1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/myapp/app/workers/hard_worker.rb

11 lines
196 B
Ruby
Raw Normal View History

class HardWorker
include Sidekiq::Worker
sidekiq_options :timeout => 60
2012-02-18 23:01:29 -05:00
def perform(name, count, salt)
2012-03-18 02:04:31 -04:00
raise name if name == 'crash'
print "#{Time.now}\n"
2012-02-18 23:01:29 -05:00
sleep count
end
end