Guest User

Untitled

a guest
Aug 25th, 2019
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data