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.
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 40
__construct(Dispatcher $dispatcher, Container $container)
Create a new handler instance.
at line 49
void
call(Job $job, array $data)
Handle the queued job.
at line 94
protected mixed
getCommand(array $data)
Get the command from the given payload.
at line 112
protected mixed
dispatchThroughMiddleware(Job $job, mixed $command)
Dispatch the given job / command through its specified middleware.
at line 145
protected mixed
resolveHandler(Job $job, mixed $command)
Resolve the handler for the given command.
at line 162
protected mixed
setJobInstanceIfNecessary(Job $job, mixed $instance)
Set the job instance of the given class if necessary.
at line 174
protected void
ensureNextJobInChainIsDispatched(mixed $command)
Ensure the next job in the chain is dispatched if applicable.
at line 184
protected void
ensureSuccessfulBatchJobIsRecorded(mixed $command)
Ensure the batch is notified of the successful job completion.
at line 202
protected void
ensureUniqueJobLockIsReleased(mixed $command)
Ensure the lock for a unique job is released.
at line 212
protected bool
commandShouldBeDebounced(mixed $command)
Determine if the debounced command was superseded by a newer dispatch.
at line 234
protected void
deleteDebouncedJob(Job $job, mixed $command)
Handle a debounced job by firing an event and deleting it.
at line 251
protected bool
commandShouldBeUnique(mixed $command)
Determine if the given command should be unique.
at line 260
protected bool
commandShouldBeUniqueUntilProcessing(mixed $command)
Determine if the given command should be unique until processing begins.
at line 269
protected void
handleModelNotFound(Job $job, Throwable $e)
Handle a model not found exception.
at line 289
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 316
protected void
ensureSuccessfulBatchJobIsRecordedForMissingModel(Job $job, string $class)
Record a potentially batched job as successful when deleted because models were missing.
at line 344
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 371
protected void
ensureFailedBatchJobIsRecorded(string $uuid, mixed $command, Throwable|null $e)
Ensure the batch is notified of the failed job.
at line 385
protected void
ensureChainCatchCallbacksAreInvoked(string $uuid, mixed $command, Throwable|null $e)
Ensure the chained job catch callbacks are invoked.
at line 395
mixed
getRunningCommand()
Get the command currently being processed.