function hook_queue_info_alter

Same name in other branches
  1. 9 core/core.api.php \hook_queue_info_alter()
  2. 10 core/core.api.php \hook_queue_info_alter()
  3. 11.x core/core.api.php \hook_queue_info_alter()

Alter cron queue information before cron runs.

Called by \Drupal\Core\Cron to allow modules to alter cron queue settings before any jobs are processed.

Parameters

array $queues: An array of cron queue information.

See also

\Drupal\Core\Queue\QueueWorkerInterface

\Drupal\Core\Annotation\QueueWorker

\Drupal\Core\Cron

Related topics

1 invocation of hook_queue_info_alter()
QueueWorkerManager::__construct in core/lib/Drupal/Core/Queue/QueueWorkerManager.php
Constructs an QueueWorkerManager object.

File

core/core.api.php, line 1973

Code

function hook_queue_info_alter(&$queues) {
    // This site has many feeds so let's spend 90 seconds on each cron run
    // updating feeds instead of the default 60.
    $queues['aggregator_feeds']['cron']['time'] = 90;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.