Module: GoodJob::ActiveJobExtensions::Batches

Extended by:
ActiveSupport::Concern
Defined in:
lib/good_job/active_job_extensions/batches.rb

Instance Method Summary collapse

Instance Method Details

#batchObject Also known as: batch?



14
15
16
# File 'lib/good_job/active_job_extensions/batches.rb', line 14

def batch
  @_batch ||= CurrentThread.job&.batch&.to_batch if CurrentThread.job.present? && CurrentThread.job.active_job_id == job_id
end