Skip to content

Instantly share code, notes, and snippets.

@electronicbites
Created October 21, 2016 10:21
Show Gist options
  • Select an option

  • Save electronicbites/b70e3a8092e976bedd2b067522337aa5 to your computer and use it in GitHub Desktop.

Select an option

Save electronicbites/b70e3a8092e976bedd2b067522337aa5 to your computer and use it in GitHub Desktop.
class HardWorker
include Sidekiq::Worker
sidekiq_options queue: :default, backtrace: true, retry: 6
def perform(name, count)
1000.times do |i|
logger.error "HardWorker #{i}, #{rand(i)}"
y = i * i / 3
z = i / 5
x = Math.sin(i) + Math.cos(i)
puts "#{i}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment