Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class ExampleJob < ApplicationJob
  2. STEPS = [
  3. { :band => "The Baboon Show" },
  4. { :band => "Blowfuse" },
  5. { :band => "CRIM" }
  6. ].each(&:freeze).freeze
  7.  
  8. def perform(options)
  9. time = Time.at(options.fetch(:timestamp))
  10.  
  11. STEPS.each do |step_options|
  12. sleep(rand(5..5))
  13.  
  14. ReleaseRadar.new(:time => time, **step_options).call
  15. end
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement