SyncJob
class SyncJob extends Job implements Job
Traits
Properties
protected mixed | $instance | The job handler instance. |
from Job |
protected Container | $container | The IoC container instance. |
from Job |
protected bool | $deleted | Indicates if the job has been deleted. |
from Job |
protected bool | $released | Indicates if the job has been released. |
from Job |
protected bool | $failed | Indicates if the job has failed. |
from Job |
protected | $connectionName | The name of the connection the job belongs to. |
from Job |
protected string | $queue | The name of the queue the job belongs to. |
from Job |
protected string | $job | The class name of the job. |
|
protected string | $payload | The queue message data. |
Methods
Release the job back into the queue.
Get the name of the queue the job belongs to.
Create a new job instance.
Get the number of times the job has been attempted.
Get the job identifier.
Get the raw body string for the job.
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.
in
Job at line 63
void
fire()
Fire the job.
in
Job at line 77
void
delete()
Delete the job from the queue.
in
Job at line 87
bool
isDeleted()
Determine if the job has been deleted.
at line 47
void
release(int $delay = 0)
Release the job back into the queue.
in
Job at line 108
bool
isReleased()
Determine if the job was released back into the queue.
in
Job at line 118
bool
isDeletedOrReleased()
Determine if the job has been deleted or released.
in
Job at line 128
bool
hasFailed()
Determine if the job has been marked as a failure.
in
Job at line 138
void
markAsFailed()
Mark the job as "failed".
in
Job at line 168
protected mixed
resolve(string $class)
Resolve the given class.
in
Job at line 178
array
payload()
Get the decoded body of the job.
in
Job at line 188
int|null
maxTries()
The number of times to attempt a job.
in
Job at line 198
int|null
timeout()
The number of seconds the job can run.
in
Job at line 208
string
getName()
Get the name of the queued job class.
in
Job 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.
in
Job at line 230
string
getConnectionName()
Get the name of the connection the job belongs to.
at line 87
string
getQueue()
Get the name of the queue the job belongs to.
at line 33
void
__construct(Container $container, string $payload, string $connectionName, string $queue)
Create a new job instance.
at line 57
int
attempts()
Get the number of times the job has been attempted.
at line 67
string
getJobId()
Get the job identifier.
at line 77
string
getRawBody()
Get the raw body string for the job.