Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ExampleJob < ApplicationJob
- STEPS = [
- { :band => "The Baboon Show" },
- { :band => "Blowfuse" },
- { :band => "CRIM" }
- ].each(&:freeze).freeze
- def perform(options)
- time = Time.at(options.fetch(:timestamp))
- STEPS.each do |step_options|
- sleep(rand(5..5))
- ReleaseRadar.new(:time => time, **step_options).call
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement