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 number of jobs across every queue.
Get the number of pending jobs across every queue.
Get the number of delayed jobs across every queue.
Get the number of reserved jobs across every queue.
Get the creation timestamp of the oldest pending job, excluding delayed jobs.
Get the pending jobs for the given queue.
Get the delayed jobs for the given queue.
Get the reserved jobs for the given queue.
Get all pending jobs across every queue.
Get all delayed jobs across every queue.
Get all reserved jobs across every queue.
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(UnitEnum|string|null $queue = null)
Get the size of the queue.
int
pendingSize(UnitEnum|string|null $queue = null)
Get the number of pending jobs.
int
delayedSize(UnitEnum|string|null $queue = null)
Get the number of delayed jobs.
int
reservedSize(UnitEnum|string|null $queue = null)
Get the number of reserved jobs.
int
totalSize()
Get the number of jobs across every queue.
int
totalPendingSize()
Get the number of pending jobs across every queue.
int
totalDelayedSize()
Get the number of delayed jobs across every queue.
int
totalReservedSize()
Get the number of reserved jobs across every queue.
int|null
creationTimeOfOldestPendingJob(UnitEnum|string|null $queue = null)
Get the creation timestamp of the oldest pending job, excluding delayed jobs.
InspectedJob>
pendingJobs(UnitEnum|string|null $queue = null)
Get the pending jobs for the given queue.
InspectedJob>
delayedJobs(UnitEnum|string|null $queue = null)
Get the delayed jobs for the given queue.
InspectedJob>
reservedJobs(UnitEnum|string|null $queue = null)
Get the reserved jobs for the given queue.
InspectedJob>
allPendingJobs()
Get all pending jobs across every queue.
InspectedJob>
allDelayedJobs()
Get all delayed jobs across every queue.
InspectedJob>
allReservedJobs()
Get all reserved jobs across every queue.
mixed
push(string|object $job, mixed $data = '', UnitEnum|string|null $queue = null)
Push a new job onto the queue.
mixed
pushOn(UnitEnum|string $queue, string|object $job, mixed $data = '')
Push a new job onto the queue.
mixed
pushRaw(string $payload, UnitEnum|string|null $queue = null, array $options = [])
Push a raw payload onto the queue.
mixed
later(DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '', UnitEnum|string|null $queue = null)
Push a new job onto the queue after (n) seconds.
mixed
laterOn(UnitEnum|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 = '', UnitEnum|string|null $queue = null)
Push an array of jobs onto the queue.
Job|null
pop(UnitEnum|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.