Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-13 21:42:53 +01:00
17 Zeilen
445 B
Ruby
17 Zeilen
445 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(user, args[:wizard_id])
|
|
user_ids.push(user.id)
|
|
end
|
|
end
|
|
|
|
MessageBus.publish "/redirect_to_wizard", args[:wizard_id], user_ids: user_ids
|
|
end
|
|
end
|
|
end
|
|
end
|