Method: Effective::ProcessWithSuckerPunchJob#perform

Defined in:
app/jobs/effective/process_with_sucker_punch_job.rb

#perform(id) ⇒ Object



7
8
9
10
11
12
# File 'app/jobs/effective/process_with_sucker_punch_job.rb', line 7

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