BeanstalkdJob
class BeanstalkdJob 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 Pheanstalk | $pheanstalk | The Pheanstalk instance. |
|
protected Job | $job | The Pheanstalk job instance. |
Methods
Delete the job from the queue.
Release the job back into the queue.
Create a new job instance.
Bury the job in the queue.
Get the number of times the job has been attempted.
Get the job identifier.
Get the raw body string for the job.
Get the underlying Pheanstalk instance.
Get the underlying Pheanstalk 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.
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 51
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.
in
Job at line 240
string
getQueue()
Get the name of the queue the job belongs to.
at line 36
void
__construct(Container $container, Pheanstalk $pheanstalk, Job $job, string $connectionName, string $queue)
Create a new job instance.
at line 65
void
bury()
Bury the job in the queue.
at line 89
int
attempts()
Get the number of times the job has been attempted.
at line 101
string
getJobId()
Get the job identifier.
at line 111
string
getRawBody()
Get the raw body string for the job.
at line 121
Pheanstalk
getPheanstalk()
Get the underlying Pheanstalk instance.
at line 131
Job
getPheanstalkJob()
Get the underlying Pheanstalk job.