class Scheduler implements Queue

Traits

InteractsWithTime

Properties

protected string $connectionName The connection name for the queue.
protected Container $container The IoC container instance.
static protected callable[] $createPayloadCallbacks The create payload callbacks.

Methods

int
size(string|null $queue = null)

Get the size of the queue.

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

Push a new job onto the queue.

getQueue($queue = null)

No description

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

Push a new job onto the queue.

mixed
pushRaw(object|array $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 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|null $queue = null)

Push an array of jobs onto the queue.

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

Create a payload string from the given job and data.

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

Create a payload array from the given job and data.

array
createObjectPayload(object $job, string $queue)

Create a payload for an object-based queue handler.

string
getDisplayName(object $job)

Get the display name for the given job.

mixed
getJobRetryDelay(mixed $job)

Get the retry delay for an object-based queue handler.

mixed
getJobExpiration(mixed $job)

Get the expiration timestamp for an object-based queue handler.

array
createStringPayload(string $job, string $queue, mixed $data)

Create a typical, string based queue payload array.

static void
createPayloadUsing(callable $callback)

Register a callback to be executed when creating job payloads.

array
withCreatePayloadHooks(string $queue, array $payload)

Create the given payload using any registered payload hooks.

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.

setContainer(Container $container)

No description

static 
handle(Request $request)

No description

Details

at line 53
int size(string|null $queue = null)

Get the size of the queue.

Parameters

string|null $queue

Return Value

int

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

Push a new job onto the queue.

Parameters

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

Return Value

mixed

at line 75
protected getQueue($queue = null)

Parameters

$queue

at line 88
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

at line 101
mixed pushRaw(object|array $payload, string|null $queue = null, array $options = [])

Push a raw payload onto the queue.

Parameters

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

Return Value

mixed

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

Push a new job onto the queue after a delay.

Parameters

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

Return Value

mixed

at line 143
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

at line 156
mixed bulk(array $jobs, mixed $data = '', string|null $queue = null)

Push an array of jobs onto the queue.

Parameters

array $jobs
mixed $data
string|null $queue

Return Value

mixed

at line 173
protected string createPayload(Closure|string|object $job, string $queue, mixed $data = '')

Create a payload string from the given job and data.

Parameters

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

Return Value

string

Exceptions

InvalidPayloadException

at line 190
protected array createPayloadArray(string|object $job, string $queue, mixed $data = '')

Create a payload array from the given job and data.

Parameters

string|object $job
string $queue
mixed $data

Return Value

array

at line 204
protected array createObjectPayload(object $job, string $queue)

Create a payload for an object-based queue handler.

Parameters

object $job
string $queue

Return Value

array

at line 235
protected string getDisplayName(object $job)

Get the display name for the given job.

Parameters

object $job

Return Value

string

at line 247
mixed getJobRetryDelay(mixed $job)

Get the retry delay for an object-based queue handler.

Parameters

mixed $job

Return Value

mixed

at line 265
mixed getJobExpiration(mixed $job)

Get the expiration timestamp for an object-based queue handler.

Parameters

mixed $job

Return Value

mixed

at line 285
protected array createStringPayload(string $job, string $queue, mixed $data)

Create a typical, string based queue payload array.

Parameters

string $job
string $queue
mixed $data

Return Value

array

at line 305
static void createPayloadUsing(callable $callback)

Register a callback to be executed when creating job payloads.

Parameters

callable $callback

Return Value

void

at line 321
protected array withCreatePayloadHooks(string $queue, array $payload)

Create the given payload using any registered payload hooks.

Parameters

string $queue
array $payload

Return Value

array

at line 343
Job|null pop(string|null $queue = null)

Pop the next job off of the queue.

Parameters

string|null $queue

Return Value

Job|null

at line 353
string getConnectionName()

Get the connection name for the queue.

Return Value

string

at line 364
$this setConnectionName(string $name)

Set the connection name for the queue.

Parameters

string $name

Return Value

$this

at line 370
setContainer(Container $container)

Parameters

Container $container

at line 376
static handle(Request $request)

Parameters

Request $request