CallQueuedListener
in package
implements
ShouldQueue
Uses
InteractsWithQueue
Interfaces, Classes and Traits
Table of Contents
- $class : string
- The listener class name.
- $data : array<string|int, mixed>
- The data to be passed to the listener.
- $method : string
- The listener method.
- $timeout : int
- The number of seconds the job can run before timing out.
- $timeoutAt : int
- The timestamp indicating when the job should timeout.
- $tries : int
- The number of times the job may be attempted.
- $job : Job
- The underlying queue job instance.
- __clone() : void
- Prepare the instance for cloning.
- __construct() : void
- Create a new job instance.
- attempts() : int
- Get the number of times the job has been attempted.
- delete() : void
- Delete the job from the queue.
- displayName() : string
- Get the display name for the queued job.
- fail() : void
- Fail the job from the queue.
- failed() : void
- Call the failed method on the job instance.
- handle() : void
- Handle the queued job.
- release() : void
- Release the job back into the queue.
- setJob() : $this
- Set the base queue job instance.
- prepareData() : void
- Unserialize the data if needed.
- setJobInstanceIfNecessary() : mixed
- Set the job instance of the given class if necessary.
Properties
$class
The listener class name.
public
string
$class
$data
The data to be passed to the listener.
public
array<string|int, mixed>
$data
$method
The listener method.
public
string
$method
$timeout
The number of seconds the job can run before timing out.
public
int
$timeout
$timeoutAt
The timestamp indicating when the job should timeout.
public
int
$timeoutAt
$tries
The number of times the job may be attempted.
public
int
$tries
$job
The underlying queue job instance.
protected
Job
$job
Methods
__clone()
Prepare the instance for cloning.
public
__clone() : void
Return values
void —__construct()
Create a new job instance.
public
__construct(string $class, string $method, array<string|int, mixed> $data) : void
Parameters
- $class : string
- $method : string
- $data : array<string|int, mixed>
Return values
void —attempts()
Get the number of times the job has been attempted.
public
attempts() : int
Return values
int —delete()
Delete the job from the queue.
public
delete() : void
Return values
void —displayName()
Get the display name for the queued job.
public
displayName() : string
Return values
string —fail()
Fail the job from the queue.
public
fail([Throwable $exception = null ]) : void
Parameters
- $exception : Throwable = null
Return values
void —failed()
Call the failed method on the job instance.
public
failed(Exception $e) : void
The event instance and the exception will be passed.
Parameters
- $e : Exception
Return values
void —handle()
Handle the queued job.
public
handle(Container $container) : void
Parameters
- $container : Container
Return values
void —release()
Release the job back into the queue.
public
release(int $delay) : void
Parameters
- $delay : int
Return values
void —setJob()
Set the base queue job instance.
public
setJob(Job $job) : $this
Parameters
- $job : Job
Return values
$this —prepareData()
Unserialize the data if needed.
protected
prepareData() : void
Return values
void —setJobInstanceIfNecessary()
Set the job instance of the given class if necessary.
protected
setJobInstanceIfNecessary(Job $job, mixed $instance) : mixed
Parameters
- $job : Job
- $instance : mixed