1
0
Fork 0
discourse-custom-wizard-unl.../jobs/set_after_time_wizard.rb
Angus McLeod ab18769820 various
2020-04-13 22:17:22 +10:00

17 Zeilen
447 B
Ruby

module Jobs
class SetAfterTimeWizard < ::Jobs::Base
def execute(args)
if CustomWizard::Wizard.find(args[:wizard_id])
user_ids = []
User.human_users.each do |user|
if CustomWizard::Wizard.set_wizard_redirect(args[:wizard_id], user)
user_ids.push(user.id)
end
end
MessageBus.publish "/redirect_to_wizard", args[:wizard_id], user_ids: user_ids
end
end
end
end