cbq Model
This model is provided to make certain tasks easier when defining and dispatching jobs, chains, and batches.
This model is provided to make certain tasks easier when defining and dispatching jobs, chains, and batches.
Dispatches a job or chain of jobs.
Arguments | Type | Required | Default | Description |
---|---|---|---|---|
Return: The dispatched Job instance.
Creates a job or chain of jobs to be dispatched.
Return: The new Job instance.
Creates a chain of jobs to be ran.
Alias for calling firstJob.chain( otherJobs )
.
Return: The first job of the chain with the chained jobs configured to be dispatched.
Creates a PendingBatch from the Jobs provided.
To use batches, you must first configure a BatchRepository
.
Learn more in the Batched Jobs documentation.
Return: The PendingBatch to be dispatched.
Arguments | Type | Required | Default | Description |
---|---|---|---|---|
Arguments | Type | Required | Default | Description |
---|---|---|---|---|
Arguments | Type | Required | Default | Description |
---|---|---|---|---|
job
string | Job | array<Job>
true
A Job instance or a WireBox ID of a Job instance. If the WireBox ID doesn't exist, a NonExecutableJob
instance will be used instead. This allows you to dispatch a Job from a server where that Job component is not defined. If an array is passed, a Job Chain is created and dispatched.
properties
struct
false
{}
A struct of properties for the Job instance.
chain
array<Job>
false
[]
An array of Jobs to chain after this Job.
queue
string
false
The queue the Job belongs to.
connection
string
false
The Connection to dispatch the Job on.
backoff
numeric
false
The amount of time, in seconds, to wait between attempting Jobs.
timeout
numeric
false
The amount of time, in seconds, to wait before treating a Job as erroring.
maxAttempts
numeric
false
The maximum amount of attempts of a Job before treating the Job as failed.
job
string | Job | array<Job>
true
A Job instance or a WireBox ID of a Job instance. If the WireBox ID doesn't exist, a NonExecutableJob
instance will be used instead. This allows you to dispatch a Job from a server where that Job component is not defined. If an array is passed, a Job Chain is created and dispatched.
properties
struct
false
{}
A struct of properties for the Job instance.
chain
array<Job>
false
[]
An array of Jobs to chain after this Job.
queue
string
false
The queue the Job belongs to.
connection
string
false
The Connection to dispatch the Job on.
backoff
numeric
false
The amount of time, in seconds, to wait between attempting Jobs.
timeout
numeric
false
The amount of time, in seconds, to wait before treating a Job as erroring.
maxAttempts
numeric
false
The maximum amount of attempts of a Job before treating the Job as failed.
jobs
array<Job>
true
The array of jobs to run in order in a chain.
jobs
array<Job>
true
An array of jobs to batch together.