Merge pull request #9523 from demarches-simplifiees/destroy_blob_not_found_in_migrations

Lors de la migration des pjs, détruit les blobs qui n'existent pas dans l'espace de stockage
This commit is contained in:
LeSim 2023-10-10 10:49:26 +00:00 committed by GitHub
commit 34dcf4ae9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,7 @@ class PjsMigrationJob < ApplicationJob
client.delete_object(container, old_key)
end
rescue Fog::OpenStack::Storage::NotFound
blob.attachments.destroy_all
end
def already_moved?(blob)