Add job exception log methods to champ and dossier

This commit is contained in:
Paul Chavard 2021-02-04 19:24:52 +01:00
parent 78a07ef021
commit a591d5528e
5 changed files with 45 additions and 2 deletions

View file

@ -137,6 +137,12 @@ class Champ < ApplicationRecord
type_de_champ.stable_id
end
def log_fetch_external_data_exception(exception)
exceptions = self.fetch_external_data_exceptions ||= []
exceptions << exception.inspect
update_column(:fetch_external_data_exceptions, exceptions)
end
private
def needs_dossier_id?