lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb



require_relative './base_job'

module CanvasSync
  module JobBatches
    class ConcurrentBatchJob < BaseJob
      def self.make_batch(sub_jobs, context: nil, &blk)
        ManagedBatchJob.make_batch(
          sub_jobs,
          ordered: false,
          concurrency: true,
          context: context,
          desc_prefix: 'ConcurrentBatchJob',
          &blk
        )
      end

      def perform(sub_jobs, context: nil)
        self.class.make_batch(sub_jobs, context: context)
      end
    end
  end
end