1
0
Fork 0
discourse-custom-wizard-unl.../jobs/clear_after_time_wizard.rb
2019-10-03 15:17:21 +10:00

14 Zeilen
354 B
Ruby

module Jobs
class ClearAfterTimeWizard < ::Jobs::Base
sidekiq_options queue: 'critical'
def execute(args)
User.human_users.each do |u|
if u.custom_fields['redirect_to_wizard'] === args[:wizard_id]
u.custom_fields.delete('redirect_to_wizard')
u.save_custom_fields(true)
end
end
end
end
end