Sha256: e337b91a29b27863193831f880ef7263150b0b931955c38f1717e8413b005d09
Contents?: true
Size: 695 Bytes
Versions: 17
Compression:
Stored size: 695 Bytes
Contents
# frozen_string_literal: true module GoodJob module ActiveJobExtensions module Batches extend ActiveSupport::Concern included do before_enqueue do |job| GoodJob.logger.debug("#{job.class} was enqueued within a batch or bulk capture block but is not using the GoodJob Adapter; the job will not appear in GoodJob.") if (GoodJob::Bulk.current_buffer || GoodJob::Batch.current_batch_id) && !job.class.queue_adapter.is_a?(GoodJob::Adapter) end end def batch @_batch ||= CurrentThread.job&.batch&.to_batch if CurrentThread.job.present? && CurrentThread.job.active_job_id == job_id end alias batch? batch end end end
Version data entries
17 entries across 17 versions & 1 rubygems