demarches-normaliennes/app/jobs/administrateurs/activate_before_expiration_job.rb

9 lines
230 B
Ruby

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