Queue

interface Queue (View source)

Methods

int size(string $queue = null)

Get the size of the queue.

mixed push(string|object $job, mixed $data = '', string $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 $queue = null, array $options = [])

Push a raw payload onto the queue.

mixed later(DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '', string $queue = null)

Push a new job onto the queue after a delay.

mixed laterOn(string $queue, DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '')

Push a new job onto the queue after a delay.

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

Push an array of jobs onto the queue.

Job|null pop(string $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(string $queue = null)

Get the size of the queue.

Parameters

string $queue

Return Value

int

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

Push a new job onto the queue.

Parameters

string|object $job
mixed $data
string $queue

Return Value

mixed

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

Push a new job onto the queue.

Parameters

string $queue
string|object $job
mixed $data

Return Value

mixed

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

Push a raw payload onto the queue.

Parameters

string $payload
string $queue
array $options

Return Value

mixed

mixed later(DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '', string $queue = null)

Push a new job onto the queue after a delay.

Parameters

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

Return Value

mixed

mixed laterOn(string $queue, DateTimeInterface|DateInterval|int $delay, string|object $job, mixed $data = '')

Push a new job onto the queue after a delay.

Parameters

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

Return Value

mixed

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

Push an array of jobs onto the queue.

Parameters

array $jobs
mixed $data
string $queue

Return Value

mixed

Job|null pop(string $queue = null)

Pop the next job off of the queue.

Parameters

string $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

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.6/Illuminate/Contracts/Queue/Queue.html