CallQueuedHandler
class CallQueuedHandler
Properties
| protected mixed | $runningCommand | The command currently being processed. |
Methods
Get the command from the given payload.
Dispatch the given job / command through its specified middleware.
Set the job instance of the given class if necessary.
Ensure the next job in the chain is dispatched if applicable.
Ensure the batch is notified of the successful job completion.
Determine if the unique job lock should be released.
Resolve the unique lock owner carried by the command or its queued payload.
Ensure the lock for a unique job is released.
Determine if the debounced command was superseded by a newer dispatch.
Handle a debounced job by firing an event and deleting it.
Determine if the given command should be unique.
Determine if the given command should be unique until processing begins.
Ensure the lock for a unique job is released via context.
Record a potentially batched job as successful when deleted because models were missing.
Ensure the batch is notified of the failed job.
Ensure the chained job catch callbacks are invoked.
Get the command currently being processed.
Details
at line 42
__construct(Dispatcher $dispatcher, Container $container)
Create a new handler instance.
at line 51
void
call(Job $job, array $data)
Handle the queued job.
at line 96
protected mixed
getCommand(array $data)
Get the command from the given payload.
at line 114
protected mixed
dispatchThroughMiddleware(Job $job, mixed $command)
Dispatch the given job / command through its specified middleware.
at line 151
protected mixed
resolveHandler(Job $job, mixed $command)
Resolve the handler for the given command.
at line 168
protected mixed
setJobInstanceIfNecessary(Job $job, mixed $instance)
Set the job instance of the given class if necessary.
at line 180
protected void
ensureNextJobInChainIsDispatched(mixed $command)
Ensure the next job in the chain is dispatched if applicable.
at line 190
protected void
ensureSuccessfulBatchJobIsRecorded(mixed $command)
Ensure the batch is notified of the successful job completion.
at line 206
protected bool
uniqueJobLockShouldBeReleased(Job $job, mixed $command)
Determine if the unique job lock should be released.
at line 216
protected string
getUniqueJobLockOwner(Job $job, mixed $command)
Resolve the unique lock owner carried by the command or its queued payload.
at line 234
protected void
ensureUniqueJobLockIsReleased(mixed $command, Job|null $job = null)
Ensure the lock for a unique job is released.
at line 247
protected bool
commandShouldBeDebounced(mixed $command)
Determine if the debounced command was superseded by a newer dispatch.
at line 269
protected void
deleteDebouncedJob(Job $job, mixed $command)
Handle a debounced job by firing an event and deleting it.
at line 286
protected bool
commandShouldBeUnique(mixed $command)
Determine if the given command should be unique.
at line 295
protected bool
commandShouldBeUniqueUntilProcessing(mixed $command)
Determine if the given command should be unique until processing begins.
at line 304
protected void
handleModelNotFound(Job $job, Throwable $e)
Handle a model not found exception.
at line 324
protected void
ensureUniqueJobLockIsReleasedViaContext()
Ensure the lock for a unique job is released via context.
This is required when we can't unserialize the job due to missing models.
at line 357
protected void
ensureSuccessfulBatchJobIsRecordedForMissingModel(Job $job, string $class)
Record a potentially batched job as successful when deleted because models were missing.
at line 385
void
failed(array $data, Throwable|null $e, string $uuid, Job|null $job = null)
Call the failed method on the job instance.
The exception that caused the failure will be passed.
at line 412
protected void
ensureFailedBatchJobIsRecorded(string $uuid, mixed $command, Throwable|null $e)
Ensure the batch is notified of the failed job.
at line 426
protected void
ensureChainCatchCallbacksAreInvoked(string $uuid, mixed $command, Throwable|null $e)
Ensure the chained job catch callbacks are invoked.
at line 436
mixed
getRunningCommand()
Get the command currently being processed.