module BatchProcessor
Batches have a status which is driven by the jobs it is processing. Callbacks are fired in response to status changes.
Batches accept a unique identifier and input representing the arguments and options which define it's collection.
Unless otherwise specified a `Batch` assumes its Job class shares a common name.
A BatchJob
calls into the Batch
to report on it's lifecycle from start to finish, including on success and failure.
The Status of a batch is manifested by a collection of predicates which track certain lifecycle events.
Unless otherwise specified a `Batch` uses the default `Parallel` Processor
.
A Batch defines, controls, and monitors the processing of a collection of items with an `ActiveJob`.
The Details of a batch are the times of critical lifecycle events and the summary counts of processed jobs.
Only a BatchJob can be used to perform work, but it can be run outside of a batch as well. Therefore, the recommendation is to make `ApplicationJob` inherit from `BatchJob`.
A `Collection` takes input to validate and build a (possibly ordered) list of items to process with the Batch's job.
When `.process` is called on a Batch
, `.execute` is called on the `Processor` specified in the Batch's definition.
Processing a Batch
performs a job for each item in its collection if **and only if** it has a valid collection.
A Processor is a service object which determines how to perform a Batch's jobs to properly process its collection.
The Parallel Processor
enqueues jobs to be performed later.
The Sequential Processor
uses `.perform_now` to procedurally process each job within the current thread.
Constants
- VERSION