Queue
class Queue implements Queue, ClearableQueue (View source)
Traits
Properties
| protected Job|null | $processingJob | The currently processing job. |
|
| protected string|null | $processingQueue | The queue for the currently processing job. |
|
| protected CarbonImmutable | $processingJobStartedAt | The date the last job started processing. |
Methods
Forward a method call to the given object.
Forward a method call to the given object, returning $this if the forwarded call returned itself.
Throw a bad method call exception for the given method.
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.
Delete all of the jobs from the queue.
Get the connection name for the queue.
Set the connection name for the queue.
Set the queue configuration array.
Get the queueable options from the job.
Finish processing the current job and emit a queue event.
Last job details resolver.
Handle jobs finishing being queued.
Normalize the queue name.
Dynamically pass method calls to the underlying queue.
Details
protected mixed
forwardCallTo(mixed $object, string $method, array $parameters)
Forward a method call to the given object.
protected mixed
forwardDecoratedCallTo(mixed $object, string $method, array $parameters)
Forward a method call to the given object, returning $this if the forwarded call returned itself.
static protected never
throwBadMethodCallException(string $method)
Throw a bad method call exception for the given method.
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.
int
clear(string $queue)
Delete all of the jobs from the queue.
string
getConnectionName()
Get the connection name for the queue.
$this
setConnectionName(string $name)
Set the connection name for the queue.
$this
setConfig(array $config)
Set the queue configuration array.
array
getQueueableOptions(mixed $job, string|null $queue, string $payload, DateTimeInterface|DateInterval|int|null $delay = null)
Get the queueable options from the job.
void
finishProcessingJob(string $default = 'processed', CarbonImmutable|null $timestamp = null)
Finish processing the current job and emit a queue event.
processingJobDetails()
Last job details resolver.
finishQueueingJob(string $queue)
Handle jobs finishing being queued.
protected void
startProcessingJob(string|null $queue, Job|null $job)
Handle a job being popped.
protected string
normalizeQueue(string|null $queue)
Normalize the queue name.
mixed
__call(string $method, array $parameters)
Dynamically pass method calls to the underlying queue.