Sha256: 62243216e79fd1dec6ff1efe83d68f5e9501adbc2cc365182539adbd7bccb555

Contents?: true

Size: 437 Bytes

Versions: 5

Compression:

Stored size: 437 Bytes

Contents

module ActiveJob
  module Retriable
    class TestAdapter < ActiveJob::QueueAdapters::TestAdapter
      def enqueue_or_perform(perform, job, job_data)
        if perform
          performed_jobs << job_data

          # Use perform_now instead of execute so all callbacks are invoked (ie: before_perform)
          ActiveJob::Base.perform_now job

        else
          enqueued_jobs << job_data
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activejob-retriable-5.0.4 lib/active_job/retriable/test_adapater.rb
activejob-retriable-5.0.3 lib/active_job/retriable/test_adapater.rb
activejob-retriable-5.0.2 lib/active_job/retriable/test_adapater.rb
activejob-retriable-5.0.1 lib/active_job/retriable/test_adapater.rb
activejob-retriable-5.0.0 lib/active_job/retriable/test_adapater.rb