Sha256: 17c4a4ede309f4679dfe0935aacf130db11fc58210ab2e019f8845684f42f45e

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

module Attached
  
  class Job
    
    @queue = :attached
    
    def self.perform(klass, id, method)
      object = eval(klass).find(id)
      attachment = object.send(name)
      attachment.reprocess!
      attachment.status = 'active'
      object.save
    end
    
    def self.enqueue(attachment)
      klass = attachment.instance.class.name
      id = attachment.instance.id
      method = attachment.name
      attachment.status = 'processing'
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
attached-0.5.2 lib/attached/job.rb