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