demarches-normaliennes/app/jobs/cron/declarative_procedures_job.rb

14 lines
302 B
Ruby
Raw Normal View History

class Cron::DeclarativeProceduresJob < Cron::CronJob
self.schedule_expression = "every 1 minute"
def perform(*args)
Procedure.declarative.find_each do |procedure|
begin
procedure.process_dossiers!
rescue => e
Sentry.capture_exception(e)
end
end
end
end