aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activestorage/lib/active_storage/service/gcs_service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/service/gcs_service.rb b/activestorage/lib/active_storage/service/gcs_service.rb
index ebf24a36d7..b3fe592097 100644
--- a/activestorage/lib/active_storage/service/gcs_service.rb
+++ b/activestorage/lib/active_storage/service/gcs_service.rb
@@ -35,7 +35,11 @@ module ActiveStorage
def delete(key)
instrument :delete, key do
- file_for(key).try(:delete)
+ begin
+ file_for(key).try(:delete)
+ rescue Google::Cloud::NotFoundError
+ # Ignore files already deleted
+ end
end
end