clear_after_time_wizard.rb 352 B

1234567891011121314
  1. module Jobs
  2. class ClearAfterTimeWizard < Jobs::Base
  3. sidekiq_options queue: 'critical'
  4. def execute(args)
  5. User.human_users.each do |u|
  6. if u.custom_fields['redirect_to_wizard'] === args[:wizard_id]
  7. u.custom_fields.delete('redirect_to_wizard')
  8. u.save_custom_fields(true)
  9. end
  10. end
  11. end
  12. end
  13. end