demarches-normaliennes/app/jobs/administrateurs/activate_before_expiration_job.rb
2019-08-14 16:34:50 +02:00

11 lines
266 B
Ruby

class Administrateurs::ActivateBeforeExpirationJob < ApplicationJob
queue_as :cron
def perform(*args)
Administrateur
.includes(:user)
.inactive
.where(created_at: 3.days.ago.all_day)
.each { |a| a.user.remind_invitation! }
end
end