PendingChain
class PendingChain
Traits
Properties
| string|null | $connection | The name of the connection the chain should be sent to. |
|
| string|null | $queue | The name of the queue the chain should be sent to. |
|
| DateInterval|DateTimeInterface|int|null | $delay | The number of seconds before the chain should be made available. |
|
| array | $catchCallbacks | The callbacks to be executed on failure. |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a new PendingChain instance.
Set the desired connection for the job.
Set the desired queue for the job.
Prepend a job to the chain.
Append a job to the chain.
Set the desired delay in seconds for the chain.
Add a callback to be executed on job failure.
Get the "catch" callbacks that have been registered.
Dispatch the job chain.
Prepare the first job of the chain for dispatch.
Details
in
Conditionable at line 23
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
in
Conditionable at line 56
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
at line 56
__construct(mixed $job, array $chain)
Create a new PendingChain instance.
at line 67
PendingChain
onConnection(UnitEnum|string|null $connection)
Set the desired connection for the job.
at line 81
PendingChain
onQueue(UnitEnum|string|null $queue)
Set the desired queue for the job.
at line 95
PendingChain
prepend(mixed $job)
Prepend a job to the chain.
at line 117
PendingChain
append(mixed $job)
Append a job to the chain.
at line 137
PendingChain
delay(DateInterval|DateTimeInterface|int|null $delay)
Set the desired delay in seconds for the chain.
at line 149
PendingChain
catch(callable $callback)
Add a callback to be executed on job failure.
at line 161
array
catchCallbacks()
Get the "catch" callbacks that have been registered.
at line 169
mixed
dispatch(mixed ...$arguments)
Dispatch the job chain.
at line 179
protected object
prepareFirstJob(array $arguments)
Prepare the first job of the chain for dispatch.
at line 222
mixed
dispatchIf(bool|Closure $boolean)
Dispatch the job chain if the given truth test passes.
at line 230
mixed
dispatchUnless(bool|Closure $boolean)
Dispatch the job chain unless the given truth test passes.