Sha256: 0c880cb701bab9a4c0ce34430f1454b4f591296ec9a67e8f47482959bed02b13

Contents?: true

Size: 260 Bytes

Versions: 32

Compression:

Stored size: 260 Bytes

Contents

# frozen_string_literal: true
module GoodJob
  module ActiveJobExtensions
    module Batches
      extend ActiveSupport::Concern

      def batch
        @_batch ||= CurrentThread.execution&.batch&.to_batch
      end
      alias batch? batch
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
good_job-3.12.7 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.6 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.5 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.4 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.3 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.2 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.1 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.0 lib/good_job/active_job_extensions/batches.rb
good_job-3.11.1 lib/good_job/active_job_extensions/batches.rb
good_job-3.11.0 lib/good_job/active_job_extensions/batches.rb
good_job-3.10.1 lib/good_job/active_job_extensions/batches.rb
good_job-3.10.0 lib/good_job/active_job_extensions/batches.rb