Sha256: a28d3ab56b28fca6f25855bfc1da7e52d198318be4fb5f582f4f4c480ea36bb7

Contents?: true

Size: 458 Bytes

Versions: 13

Compression:

Stored size: 458 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

13 entries across 13 versions & 1 rubygems

Version Path
attached-1.0.4 lib/attached/job.rb
attached-1.0.3 lib/attached/job.rb
attached-1.0.2 lib/attached/job.rb
attached-1.0.1 lib/attached/job.rb
attached-1.0.0 lib/attached/job.rb
attached-0.6.0 lib/attached/job.rb
attached-0.5.9 lib/attached/job.rb
attached-0.5.8 lib/attached/job.rb
attached-0.5.7 lib/attached/job.rb
attached-0.5.6 lib/attached/job.rb
attached-0.5.5 lib/attached/job.rb
attached-0.5.4 lib/attached/job.rb
attached-0.5.3 lib/attached/job.rb