Skip to content

Commit

Permalink
Merge pull request #9523 from demarches-simplifiees/destroy_blob_not_…
Browse files Browse the repository at this point in the history
…found_in_migrations

Lors de la migration des pjs, détruit les blobs qui n'existent pas dans l'espace de stockage
  • Loading branch information
LeSim authored Oct 10, 2023
2 parents 75d2ad9 + 23b68fa commit 34dcf4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/jobs/pjs_migration_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def perform(blob_id)
client.delete_object(container, old_key)
end
rescue Fog::OpenStack::Storage::NotFound
blob.attachments.destroy_all
end

def already_moved?(blob)
Expand Down

0 comments on commit 34dcf4a

Please sign in to comment.