Sha256: 74764bafb0a030fde09db0f09a89eadad7a2691c15e382add22d278eec94990d

Contents?: true

Size: 460 Bytes

Versions: 6

Compression:

Stored size: 460 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'
    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

6 entries across 6 versions & 1 rubygems

Version Path
attached-0.5.1 lib/attached/job.rb
attached-0.5.0 lib/attached/job.rb
attached-0.4.9 lib/attached/job.rb
attached-0.4.8 lib/attached/job.rb
attached-0.4.7 lib/attached/job.rb
attached-0.4.6 lib/attached/job.rb