Job
abstract class Job
Traits
Properties
protected mixed | $instance | The job handler instance. |
|
protected Container | $container | The IoC container instance. |
|
protected bool | $deleted | Indicates if the job has been deleted. |
|
protected bool | $released | Indicates if the job has been released. |
|
protected bool | $failed | Indicates if the job has failed. |
|
protected | $connectionName | The name of the connection the job belongs to. |
|
protected string | $queue | The name of the queue the job belongs to. |
Methods
Fire the job.
Delete the job from the queue.
Determine if the job has been deleted.
Release the job back into the queue.
Determine if the job was released back into the queue.
Determine if the job has been deleted or released.
Determine if the job has been marked as a failure.
Mark the job as "failed".
Resolve the given class.
Get the decoded body of the job.
The number of times to attempt a job.
The number of seconds the job can run.
Get the name of the queued job class.
Get the resolved name of the queued job class.
Get the name of the connection the job belongs to.
Get the name of the queue the job belongs to.
Get the service container instance.
Details
in
InteractsWithTime at line 16
protected int
secondsUntil(DateTimeInterface $delay)
Get the number of seconds until the given DateTime.
in
InteractsWithTime at line 29
protected int
availableAt(DateTimeInterface|int $delay = 0)
Get the "available at" UNIX timestamp.
in
InteractsWithTime at line 41
protected int
currentTime()
Get the current system time as a UNIX timestamp.
at line 63
void
fire()
Fire the job.
at line 77
void
delete()
Delete the job from the queue.
at line 87
bool
isDeleted()
Determine if the job has been deleted.
at line 98
void
release(int $delay = 0)
Release the job back into the queue.
at line 108
bool
isReleased()
Determine if the job was released back into the queue.
at line 118
bool
isDeletedOrReleased()
Determine if the job has been deleted or released.
at line 128
bool
hasFailed()
Determine if the job has been marked as a failure.
at line 138
void
markAsFailed()
Mark the job as "failed".
at line 149
void
failed(Exception $e)
Process an exception that caused the job to fail.
at line 168
protected mixed
resolve(string $class)
Resolve the given class.
at line 178
array
payload()
Get the decoded body of the job.
at line 188
int|null
maxTries()
The number of times to attempt a job.
at line 198
int|null
timeout()
The number of seconds the job can run.
at line 208
string
getName()
Get the name of the queued job class.
at line 220
string
resolveName()
Get the resolved name of the queued job class.
Resolves the name of "wrapped" jobs such as class-based handlers.
at line 230
string
getConnectionName()
Get the name of the connection the job belongs to.
at line 240
string
getQueue()
Get the name of the queue the job belongs to.
at line 250
Container
getContainer()
Get the service container instance.