Queue
interface Queue (View source)
Methods
Get the size of the queue.
Get the number of pending jobs.
Get the number of delayed jobs.
Get the number of reserved jobs.
Get the creation timestamp of the oldest pending job, excluding delayed jobs.
Push a new job onto the queue.
Push a new job onto the queue.
Push a raw payload onto the queue.
Push a new job onto the queue after (n) seconds.
Push a new job onto a specific queue after (n) seconds.
Push an array of jobs onto the queue.
Get the connection name for the queue.
Set the connection name for the queue.
Details
int
size(string|null $queue = null)
Get the size of the queue.
int
pendingSize(string|null $queue = null)
Get the number of pending jobs.
int
delayedSize(string|null $queue = null)
Get the number of delayed jobs.
int
reservedSize(string|null $queue = null)
Get the number of reserved jobs.
int|null
creationTimeOfOldestPendingJob(string|null $queue = null)
Get the creation timestamp of the oldest pending job, excluding delayed jobs.
mixed
push(string|object $job, mixed $data = '', string|null $queue = null)
Push a new job onto the queue.
mixed
pushOn(string $queue, string|object $job, mixed $data = '')
Push a new job onto the queue.
mixed
pushRaw(string $payload, string|null $queue = null, array $options = [])
Push a raw payload onto the queue.
mixed
later(DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '', string|null $queue = null)
Push a new job onto the queue after (n) seconds.
mixed
laterOn(string $queue, DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '')
Push a new job onto a specific queue after (n) seconds.
mixed
bulk(array $jobs, mixed $data = '', string|null $queue = null)
Push an array of jobs onto the queue.
Job|null
pop(string|null $queue = null)
Pop the next job off of the queue.
string
getConnectionName()
Get the connection name for the queue.
$this
setConnectionName(string $name)
Set the connection name for the queue.