From 7611236a67a61afae4688924a7577843efa78022 Mon Sep 17 00:00:00 2001 From: Joseph Hale Date: Mon, 2 Mar 2026 14:40:21 -0700 Subject: [PATCH] Simplify comment in skip-detached override Co-Authored-By: Claude Opus 4.6 --- lib/rails_ext/active_storage_analyze_job_skip_detached.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/rails_ext/active_storage_analyze_job_skip_detached.rb b/lib/rails_ext/active_storage_analyze_job_skip_detached.rb index efa671335..e48154652 100644 --- a/lib/rails_ext/active_storage_analyze_job_skip_detached.rb +++ b/lib/rails_ext/active_storage_analyze_job_skip_detached.rb @@ -1,9 +1,5 @@ -# Skip analysis for blobs whose attachments have already been destroyed. -# -# When an upload is deleted before AnalyzeJob runs, PurgeOnLastAttachment has -# already destroyed the attachment row and enqueued PurgeJob for the blob's S3 -# object. Analyzing at this point hits a missing key. Same check as -# PurgeOnLastAttachment#purge_blob_if_last. +# Skip analysis for blobs whose attachments have already been destroyed. Avoids +# Aws::S3::Errors::NoSuchKey when an upload is deleted before AnalyzeJob runs. module ActiveStorageAnalyzeJobSkipDetached def perform(blob) return unless blob.attachments.exists?