Merge pull request #7037 from adullact/fix/7036-after-party-cloned-revisions
Échec de la tâche AfterParty fix_cloned_revisions
This commit is contained in:
commit
697d60c17d
1 changed files with 19 additions and 14 deletions
|
@ -5,6 +5,7 @@ namespace :after_party do
|
|||
|
||||
Procedure.with_discarded.where(aasm_state: :brouillon).where.not(published_revision_id: nil).update_all(published_revision_id: nil)
|
||||
|
||||
begin
|
||||
types_de_champ = TypeDeChamp.joins(:revision).where('types_de_champ.procedure_id != procedure_revisions.procedure_id')
|
||||
progress = ProgressReport.new(types_de_champ.count)
|
||||
|
||||
|
@ -16,10 +17,14 @@ namespace :after_party do
|
|||
end
|
||||
|
||||
progress.finish
|
||||
|
||||
rescue ActiveRecord::StatementInvalid, PG::UndefinedColumn => e
|
||||
warn e.message
|
||||
puts "Skip deploy task."
|
||||
ensure
|
||||
# Update task as completed. If you remove the line below, the task will
|
||||
# run with every deploy (or every time you call after_party:run).
|
||||
AfterParty::TaskRecord
|
||||
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue