class QueueFactory implements Factory

Methods

__construct(Closure $factory, Repository|null $cache = null, Dispatcher|null $events = null)

Expects a callback that will be called to instantiate the queue adapter, once requested by the application.

Queue
connection(string $name = null)

Resolve a queue connection instance.

bool
isPaused(string $connection, string $queue)

Determine if a queue is paused.

array
getPausedQueues(string $connection, array $queues)

Determine which of the given queues are currently paused.

void
pause(string $connection, string $queue)

Pause a queue by its connection and name.

void
pauseFor(string $connection, string $queue, DateTimeInterface|DateInterval|int $ttl)

Pause a queue by its connection and name for a given amount of time.

void
resume(string $connection, string $queue)

Resume a paused queue by its connection and name.

array
pausedQueues(string|null $connection)

The names of the queues currently paused on the given connection.

void
trackPausedQueue(string|null $connection, string $queue)

No description

void
untrackPausedQueue(string|null $connection, string $queue)

No description

void
withoutInterruptionPolling()

Indicate that queue workers should not poll for restart or pause signals.

Details

__construct(Closure $factory, Repository|null $cache = null, Dispatcher|null $events = null)

Expects a callback that will be called to instantiate the queue adapter, once requested by the application.

Parameters

Closure $factory
Repository|null $cache
Dispatcher|null $events

Queue connection(string $name = null)

Resolve a queue connection instance.

Parameters

string $name

Return Value

Queue

bool isPaused(string $connection, string $queue)

Determine if a queue is paused.

Parameters

string $connection
string $queue

Return Value

bool

array getPausedQueues(string $connection, array $queues)

Determine which of the given queues are currently paused.

Parameters

string $connection
array $queues

Return Value

array

void pause(string $connection, string $queue)

Pause a queue by its connection and name.

Parameters

string $connection
string $queue

Return Value

void

void pauseFor(string $connection, string $queue, DateTimeInterface|DateInterval|int $ttl)

Pause a queue by its connection and name for a given amount of time.

Parameters

string $connection
string $queue
DateTimeInterface|DateInterval|int $ttl

Return Value

void

void resume(string $connection, string $queue)

Resume a paused queue by its connection and name.

Parameters

string $connection
string $queue

Return Value

void

array pausedQueues(string|null $connection)

The names of the queues currently paused on the given connection.

This is a Flarum addition over Illuminate's surface, powering the admin dashboard warning. Pauses are tracked when made through this factory; entries whose underlying pause has expired (pauseFor) or was cleared externally are filtered out.

Parameters

string|null $connection

Return Value

array

protected void trackPausedQueue(string|null $connection, string $queue)

Parameters

string|null $connection
string $queue

Return Value

void

protected void untrackPausedQueue(string|null $connection, string $queue)

Parameters

string|null $connection
string $queue

Return Value

void

void withoutInterruptionPolling()

Indicate that queue workers should not poll for restart or pause signals.

Return Value

void