2021-03-11 07:30:15 +01:00
|
|
|
# frozen_string_literal: true
|
2017-11-01 05:21:14 +01:00
|
|
|
module Jobs
|
2019-10-03 07:17:21 +02: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|
|
2020-11-09 04:32:36 +01:00
|
|
|
if u.custom_fields['redirect_to_wizard'] == args[:wizard_id]
|
2017-11-01 05:21:14 +01:00
|
|
|
u.custom_fields.delete('redirect_to_wizard')
|
|
|
|
u.save_custom_fields(true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|