2020-11-13 14:34:53 +01:00
|
|
|
class Cron::DeclarativeProceduresJob < Cron::CronJob
|
2020-04-01 15:26:46 +02:00
|
|
|
self.schedule_expression = "every 1 minute"
|
2019-05-23 14:28:14 +02:00
|
|
|
|
|
|
|
def perform(*args)
|
2022-06-10 14:53:15 +02:00
|
|
|
Procedure.declarative.find_each do |procedure|
|
|
|
|
begin
|
|
|
|
procedure.process_dossiers!
|
|
|
|
rescue => e
|
|
|
|
Sentry.capture_exception(e)
|
|
|
|
end
|
|
|
|
end
|
2019-05-23 14:28:14 +02:00
|
|
|
end
|
|
|
|
end
|