QueueInterface
in
A queue for processing jobs.
Table of Contents
Methods
- pop() : JobInterface|null
- Get the next job from the queue.
- push() : string
- Push a job onto the queue.
Methods
pop()
Get the next job from the queue.
public
pop([int $timeout = 0 ]) : JobInterface|null
This is a blocking operation unless the timeout is negative.
Parameters
- $timeout : int = 0
-
wait for a job, in seconds
- negative: return immediately
- zero: block indefinitely
- positive: wait for the given number of seconds
Return values
JobInterface|null —the next job in the queue, otherwise null if empty
push()
Push a job onto the queue.
public
push(JobInterface $job[, array<string|int, mixed> $options = [] ]) : string
Options provide queue-specific configurations such as tags, priority, reserve time, delays, retries, etc.
Parameters
- $job : JobInterface
- $options : array<string|int, mixed> = []
Return values
string —an unique identifier for the job within the queue