Job
Uses
Properties
$instance mixed
The job handler instance.
$deleted bool
Indicates if the job has been deleted.
$released bool
Indicates if the job has been released.
$failed bool
Indicates if the job has failed.
$connectionName string
The name of the connection the job belongs to.
$queue string
The name of the queue the job belongs to.
Methods
getJobId ( ) : string
Get the job identifier.
getRawBody ( ) : string
Get the raw body of the job.
uuid ( ) : string|null
Get the UUID of the job.
fire ( ) : void
Fire the job.
delete ( ) : void
Delete the job from the queue.
isDeleted ( ) : bool
Determine if the job has been deleted.
release ( $delay ) : void
Release the job back into the queue after (n) seconds.
Parameters
- $delay int
isReleased ( ) : bool
Determine if the job was released back into the queue.
isDeletedOrReleased ( ) : bool
Determine if the job has been deleted or released.
hasFailed ( ) : bool
Determine if the job has been marked as a failure.
markAsFailed ( ) : void
Mark the job as "failed".
fail ( $e ) : void
Delete the job, call the "failed" method, and raise the failed job event.
Parameters
- $e Throwable |null
failed ( $e ) : void
Process an exception that caused the job to fail.
Parameters
- $e Throwable |null
resolve ( $class ) : mixed
Resolve the given class.
Parameters
- $class string
getResolvedJob ( ) : mixed
Get the resolved job handler instance.
payload ( ) : array
Get the decoded body of the job.
maxTries ( ) : int|null
Get the number of times to attempt a job.
maxExceptions ( ) : int|null
Get the number of times to attempt a job after an exception.
shouldFailOnTimeout ( ) : bool
Determine if the job should fail when it timeouts.
backoff ( ) : int|int[]|null
The number of seconds to wait before retrying a job that encountered an uncaught exception.
timeout ( ) : int|null
Get the number of seconds the job can run.
retryUntil ( ) : int|null
Get the timestamp indicating when the job should timeout.
getName ( ) : string
Get the name of the queued job class.
resolveName ( ) : string
Get the resolved name of the queued job class.
getConnectionName ( ) : string
Get the name of the connection the job belongs to.
getQueue ( ) : string
Get the name of the queue the job belongs to.