Sha256: 65ea9ff75e7ee695232c1dbbcb1d4fc2126f020329cf85acec25e65e55c3d546
Contents?: true
Size: 358 Bytes
Versions: 26
Compression:
Stored size: 358 Bytes
Contents
module Effective class ProcessWithActiveJob < (defined?(ApplicationJob) ? ApplicationJob : ActiveJob::Base) 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