Queue
in package
Table of Contents
Properties
- $adapter : Adapter
- The queue adapter
- $connection : mixed
- The queue config
- $jobs : mixed
Methods
- commands() : mixed
- Return queue commands
- connect() : Queue
- Connect to queue adapter
- getAdapter() : mixed
- Get the queue adapter
- getNextJob() : object
- Get all jobs for processing
- markJobAsFailed() : mixed
- Mark job as failed
- pop() : mixed
- Pop job from queue
- push() : mixed
- Push job to queue
- retryFailedJob() : mixed
- Retry failed job
- setJobStatus() : mixed
- Set job status
Properties
$adapter
The queue adapter
protected
Adapter
$adapter
$connection
The queue config
protected
mixed
$connection
= []
$jobs
protected
mixed
$jobs
= []
Methods
commands()
Return queue commands
public
static commands() : mixed
connect()
Connect to queue adapter
public
connect(array<string|int, mixed> $connection) : Queue
Parameters
- $connection : array<string|int, mixed>
-
The connection to use
Return values
QueuegetAdapter()
Get the queue adapter
public
getAdapter() : mixed
getNextJob()
Get all jobs for processing
public
getNextJob() : object
Return values
objectmarkJobAsFailed()
Mark job as failed
public
markJobAsFailed(string|int $id) : mixed
Parameters
- $id : string|int
-
The id of the job to mark as failed
pop()
Pop job from queue
public
pop(string|int $id) : mixed
Parameters
- $id : string|int
-
The id of the job to pop
push()
Push job to queue
public
push(array<string|int, mixed> $job) : mixed
Parameters
- $job : array<string|int, mixed>
-
The job to push to the queue
retryFailedJob()
Retry failed job
public
retryFailedJob(string|int $id[, string|int $retryCount = 0 ]) : mixed
Parameters
- $id : string|int
-
The id of the job to retry
- $retryCount : string|int = 0
-
The number of times the job has been retried
setJobStatus()
Set job status
public
setJobStatus(string|int $id, string $status) : mixed
Parameters
- $id : string|int
-
The id of the job to set status
- $status : string
-
The status to set