class QueueCommands extends DrushCommands (View source)

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected QueueWorkerManager $workerManager
protected $queueService
static protected array $queues Keep track of queue definitions.

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(QueueWorkerManagerInterface $workerManager, QueueFactory $queueService)

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

QueueWorkerManager
getWorkerManager()

No description

QueueFactory
getQueueService()

No description

run($name, $options = ['time-limit' => self::REQ])

Run a specific queue by name.

RowsOfFields
qList($options = ['format' => 'table'])

Returns a list of all defined queues.

delete($name)

Delete all items in a specific queue.

CommandError|null
validateQueueName(CommandData $commandData)

Validate that queue permission exists.

getQueues()

{@inheritdoc}

QueueInterface
getQueue($name)

{@inheritdoc}

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(QueueWorkerManagerInterface $workerManager, QueueFactory $queueService)

Parameters

QueueWorkerManagerInterface $workerManager
QueueFactory $queueService

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

QueueWorkerManager getWorkerManager()

Return Value

QueueWorkerManager

QueueFactory getQueueService()

Return Value

QueueFactory

run($name, $options = ['time-limit' => self::REQ])

Run a specific queue by name.

Parameters

$name
$options

RowsOfFields qList($options = ['format' => 'table'])

Returns a list of all defined queues.

Parameters

$options

Return Value

RowsOfFields

delete($name)

Delete all items in a specific queue.

Parameters

$name The name of the queue to run, as defined in either hook_queue_info or hook_cron_queue_info.

CommandError|null validateQueueName(CommandData $commandData)

Validate that queue permission exists.

Annotation value should be the name of the argument/option containing the name.

Parameters

CommandData $commandData

Return Value

CommandError|null

getQueues()

{@inheritdoc}

QueueInterface getQueue($name)

{@inheritdoc}

Parameters

$name

Return Value

QueueInterface