fix(DeclarativeProceduresJob.perform_now): avoid to crash other demarche when one fail
This commit is contained in:
parent
ab04369c06
commit
b84c2966c4
1 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,12 @@ class Cron::DeclarativeProceduresJob < Cron::CronJob
|
||||||
self.schedule_expression = "every 1 minute"
|
self.schedule_expression = "every 1 minute"
|
||||||
|
|
||||||
def perform(*args)
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue