Sha256: cd808e19c03914c811f0c5042a67e246dd1c7cdffe635afcc84316b945eddcb1
Contents?: true
Size: 693 Bytes
Versions: 10
Compression:
Stored size: 693 Bytes
Contents
module Pageflow class UploadFileToS3Job @queue = :slow extend StateMachineJob def self.perform_with_result(file, options) if file && file.attachment_on_filesystem.file? if File.exists?(file.attachment_on_filesystem.path) file.attachment_on_s3 = file.attachment_on_filesystem file.save! file.attachment_on_filesystem.destroy :ok else logger.info "#{file.class.name} #{file.id} not yet transfered to instance." :pending end else logger.warn "#{file.class.name} #{file.id} does not have an attachment on the file system. ignoring." :error end end end end
Version data entries
10 entries across 10 versions & 1 rubygems