0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 10:40:28 +01:00
discourse-custom-wizard/jobs/clear_after_time_wizard.rb

15 Zeilen
352 B
Ruby

2017-11-01 05:21:14 +01:00
module Jobs
2017-11-01 10:50:03 +01:00
class ClearAfterTimeWizard < Jobs::Base
2017-11-01 05:21:14 +01:00
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