Sha256: 30621076973356c9829dbd5e8812ecf2549b2e653bc54786b75694f212401d01
Contents?: true
Size: 578 Bytes
Versions: 38
Compression:
Stored size: 578 Bytes
Contents
module Pageflow class ProcessImageOrTextTrackJob < ApplicationJob queue_as :resizing include StateMachineJob def perform_with_result(file, _options) file.attachment.reprocess! if file.valid? :ok else reset_invalid_attachment(file) :error end rescue ActiveRecord::RecordInvalid, Errno::ENAMETOOLONG reset_invalid_attachment(file) :error end def reset_invalid_attachment(file) file_name = file.file_name file.attachment = nil file.file_name = file_name end end end
Version data entries
38 entries across 38 versions & 1 rubygems