Skip AnalyzeJob when blob has no attachments
Upload-then-delete races cause AnalyzeJob to hit S3 after PurgeJob has already removed the object, producing Aws::S3::Errors::NoSuchKey noise in solid_queue_failed_executions. Since PurgeOnLastAttachment destroys the attachment row before enqueueing PurgeJob, checking blob.attachments.exists? catches this — a fast DB query that avoids the S3 round-trip entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
# there is currently a bug https://github.com/rails/rails/issues/55144
|
||||
module ActiveStorageAnalyzeJobSuppressBroadcasts
|
||||
def perform(blob)
|
||||
return unless blob.attachments.exists?
|
||||
|
||||
Board.suppressing_turbo_broadcasts do
|
||||
Card.suppressing_turbo_broadcasts do
|
||||
super
|
||||
|
||||
Reference in New Issue
Block a user