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

Version Path
effective_assets-1.12.2 app/jobs/effective/process_with_active_job.rb
effective_assets-1.12.1 app/jobs/effective/process_with_active_job.rb
effective_assets-1.12.0 app/jobs/effective/process_with_active_job.rb
effective_assets-1.11.5 app/jobs/effective/process_with_active_job.rb
effective_assets-1.11.4 app/jobs/effective/process_with_active_job.rb
effective_assets-1.11.3 app/jobs/effective/process_with_active_job.rb
effective_assets-1.11.2 app/jobs/effective/process_with_active_job.rb
effective_assets-1.11.1 app/jobs/effective/process_with_active_job.rb
effective_assets-1.11.0 app/jobs/effective/process_with_active_job.rb
effective_assets-1.10.1 app/jobs/effective/process_with_active_job.rb
effective_assets-1.10.0 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.14 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.13 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.12 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.11 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.10 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.9 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.8 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.7 app/jobs/effective/process_with_active_job.rb
effective_assets-1.9.6 app/jobs/effective/process_with_active_job.rb