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.12.2 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.12.1 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.12.0 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.11.5 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.11.4 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.11.3 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.11.2 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.11.1 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.11.0 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.10.1 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.10.0 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.14 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.13 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.12 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.11 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.10 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.9 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.8 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.7 app/jobs/effective/process_with_sucker_punch_job.rb
effective_assets-1.9.6 app/jobs/effective/process_with_sucker_punch_job.rb