Sha256: 3d294ac65903574226179a0d014020bc448fb583a194ed466f363fcef8da3221

Contents?: true

Size: 354 Bytes

Versions: 26

Compression:

Stored size: 354 Bytes

Contents

require 'sucker_punch'

module Effective
  class ProcessWithSuckerPunchJob
    include ::SuckerPunch::Job

    def perform(id)
      ActiveRecord::Base.connection_pool.with_connection do
        asset = id.kind_of?(Effective::Asset) ? id : Effective::Asset.where(id: (id.to_i rescue 0)).first
        asset.process! if asset
      end
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
effective_assets-1.9.5 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.4 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.3 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.2 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.1 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.0 app/jobs/effective/process_with_sucker_punch_job.rb