about summary refs log tree commit diff
path: root/app/models/media_attachment.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-11-01 15:27:58 +0100
committerGitHub <noreply@github.com>2022-11-01 15:27:58 +0100
commit15bae3e0e467a19582a25e0482cd26c1c82fd7f9 (patch)
treee31f10cfcbcbc6168934031ddf9d0c81615afc5b /app/models/media_attachment.rb
parentc68e6b52d9d4da5d34380587cb6faaabdfedfb35 (diff)
Change post-processing to be deferred only for large media types (#19617)
Diffstat (limited to 'app/models/media_attachment.rb')
-rw-r--r--app/models/media_attachment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 4a1948380..81e8ef2dc 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -248,11 +248,11 @@ class MediaAttachment < ApplicationRecord
   attr_writer :delay_processing
 
   def delay_processing?
-    @delay_processing
+    @delay_processing && larger_media_format?
   end
 
   def delay_processing_for_attachment?(attachment_name)
-    @delay_processing && attachment_name == :file
+    delay_processing? && attachment_name == :file
   end
 
   after_commit :enqueue_processing, on: :create