set_after_time_wizard.rb 445 B

1234567891011121314151617
  1. module Jobs
  2. class SetAfterTimeWizard < Jobs::Base
  3. def execute(args)
  4. if CustomWizard::Wizard.find(args[:wizard_id])
  5. user_ids = []
  6. User.human_users.each do |user|
  7. if CustomWizard::Wizard.set_wizard_redirect(user, args[:wizard_id])
  8. user_ids.push(user.id)
  9. end
  10. end
  11. MessageBus.publish "/redirect_to_wizard", args[:wizard_id], user_ids: user_ids
  12. end
  13. end
  14. end
  15. end