diff --git a/app/jobs/cron/declarative_procedures_job.rb b/app/jobs/cron/declarative_procedures_job.rb index 4a2bc613d..643ba7f06 100644 --- a/app/jobs/cron/declarative_procedures_job.rb +++ b/app/jobs/cron/declarative_procedures_job.rb @@ -2,6 +2,12 @@ class Cron::DeclarativeProceduresJob < Cron::CronJob self.schedule_expression = "every 1 minute" def perform(*args) - Procedure.declarative.find_each(&:process_dossiers!) + Procedure.declarative.find_each do |procedure| + begin + procedure.process_dossiers! + rescue => e + Sentry.capture_exception(e) + end + end end end