diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-02-27 10:51:25 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-02-27 10:51:25 +0000 |
commit | 3cd6a773a1a1d0a269368c5cb14a812a56d15847 (patch) | |
tree | 55e97290a7deb5c829531fd903449025a15631c9 /modules/system/system.api.php | |
parent | a9286dd3c2fd43bb7c6966ca08335772e4608be5 (diff) | |
download | brdo-3cd6a773a1a1d0a269368c5cb14a812a56d15847.tar.gz brdo-3cd6a773a1a1d0a269368c5cb14a812a56d15847.tar.bz2 |
- Patch #718648 by chx, robeano: hook_cron_queue_info_alter() is not documented.
Diffstat (limited to 'modules/system/system.api.php')
-rw-r--r-- | modules/system/system.api.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 60c12dadb..1ed92dfe3 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -383,16 +383,34 @@ function hook_cron() { * worker in seconds. Defaults to 15. * * @see hook_cron() + * @see hook_cron_queue_info_alter() */ function hook_cron_queue_info() { $queues['aggregator_feeds'] = array( 'worker callback' => 'aggregator_refresh', - 'time' => 15, + 'time' => 60, ); return $queues; } /** + * Alter cron queue information before cron runs. + * + * Called by drupal_run_cron() to allow modules to alter cron queue settings + * before any jobs are processesed. + * + * @param array $queues + * An array of cron queue information. + * + * @see hook_cron_queue_info() + */ +function hook_cron_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']['time'] = 90; +} + +/** * Allows modules to declare their own Forms API element types and specify their * default values. * |