interface Queue (View source)

Methods

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.

Details

int size(UnitEnum|string|null $queue = null)

Get the size of the queue.

Parameters

UnitEnum|string|null $queue

Return Value

int

int pendingSize(UnitEnum|string|null $queue = null)

Get the number of pending jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int

int delayedSize(UnitEnum|string|null $queue = null)

Get the number of delayed jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int

int reservedSize(UnitEnum|string|null $queue = null)

Get the number of reserved jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int

int totalSize()

Get the number of jobs across every queue.

Return Value

int

int totalPendingSize()

Get the number of pending jobs across every queue.

Return Value

int

int totalDelayedSize()

Get the number of delayed jobs across every queue.

Return Value

int

int totalReservedSize()

Get the number of reserved jobs across every queue.

Return Value

int

int|null creationTimeOfOldestPendingJob(UnitEnum|string|null $queue = null)

Get the creation timestamp of the oldest pending job, excluding delayed jobs.

Parameters

UnitEnum|string|null $queue

Return Value

int|null

InspectedJob> pendingJobs(UnitEnum|string|null $queue = null)

Get the pending jobs for the given queue.

Parameters

UnitEnum|string|null $queue

Return Value

InspectedJob>

InspectedJob> delayedJobs(UnitEnum|string|null $queue = null)

Get the delayed jobs for the given queue.

Parameters

UnitEnum|string|null $queue

Return Value

InspectedJob>

InspectedJob> reservedJobs(UnitEnum|string|null $queue = null)

Get the reserved jobs for the given queue.

Parameters

UnitEnum|string|null $queue

Return Value

InspectedJob>

InspectedJob> allPendingJobs()

Get all pending jobs across every queue.

Return Value

InspectedJob>

InspectedJob> allDelayedJobs()

Get all delayed jobs across every queue.

Return Value

InspectedJob>

InspectedJob> allReservedJobs()

Get all reserved jobs across every queue.

Return Value

InspectedJob>

mixed push(string|object $job, mixed $data = '', UnitEnum|string|null $queue = null)

Push a new job onto the queue.

Parameters

string|object $job
mixed $data
UnitEnum|string|null $queue

Return Value

mixed

mixed pushOn(UnitEnum|string $queue, string|object $job, mixed $data = '')

Push a new job onto the queue.

Parameters

UnitEnum|string $queue
string|object $job
mixed $data

Return Value

mixed

mixed pushRaw(string $payload, UnitEnum|string|null $queue = null, array $options = [])

Push a raw payload onto the queue.

Parameters

string $payload
UnitEnum|string|null $queue
array $options

Return Value

mixed

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.

Parameters

DateTimeInterface|DateInterval|int $delay
string|object $job
mixed $data
UnitEnum|string|null $queue

Return Value

mixed

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.

Parameters

UnitEnum|string $queue
DateTimeInterface|DateInterval|int $delay
string|object $job
mixed $data

Return Value

mixed

mixed bulk(array $jobs, mixed $data = '', UnitEnum|string|null $queue = null)

Push an array of jobs onto the queue.

Parameters

array $jobs
mixed $data
UnitEnum|string|null $queue

Return Value

mixed

Job|null pop(UnitEnum|string|null $queue = null)

Pop the next job off of the queue.

Parameters

UnitEnum|string|null $queue

Return Value

Job|null

string getConnectionName()

Get the connection name for the queue.

Return Value

string

$this setConnectionName(string $name)

Set the connection name for the queue.

Parameters

string $name

Return Value

$this