0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-30 04:30:29 +01:00
discourse-custom-wizard/jobs/set_after_time_wizard.rb

18 Zeilen
447 B
Ruby

2017-11-01 05:21:14 +01:00
module Jobs
2019-10-03 07:17:21 +02:00
class SetAfterTimeWizard < ::Jobs::Base
2017-11-01 05:21:14 +01:00
def execute(args)
2018-06-14 02:00:36 +02:00
if CustomWizard::Wizard.find(args[:wizard_id])
2017-11-01 05:21:14 +01:00
user_ids = []
User.human_users.each do |user|
if CustomWizard::Wizard.set_wizard_redirect(user, args[:wizard_id])
user_ids.push(user.id)
end
2017-11-01 05:21:14 +01:00
end
2017-11-01 05:21:14 +01:00
MessageBus.publish "/redirect_to_wizard", args[:wizard_id], user_ids: user_ids
end
end
end
end