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.15.14 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.13 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.12 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.11 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.10 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.9 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.8 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.7 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.6 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.5 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.4 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.3 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.2 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.1 lib/good_job/active_job_extensions/batches.rb
good_job-3.15.0 lib/good_job/active_job_extensions/batches.rb
good_job-3.14.2 lib/good_job/active_job_extensions/batches.rb
good_job-3.14.1 lib/good_job/active_job_extensions/batches.rb
good_job-3.14.0 lib/good_job/active_job_extensions/batches.rb
good_job-3.13.0 lib/good_job/active_job_extensions/batches.rb
good_job-3.12.8 lib/good_job/active_job_extensions/batches.rb