You are here

function hosting_cron_hosting_queues in Hosting 7.3

Same name and namespace in other branches
  1. 5 cron/hosting_cron.module \hosting_cron_hosting_queues()
  2. 6.2 cron/hosting_cron.module \hosting_cron_hosting_queues()
  3. 7.4 cron/hosting_cron.module \hosting_cron_hosting_queues()

Implements hook_hosting_queues().

@todo: In Hosting 4.x change the type to HOSTING_QUEUE_TYPE_SPREAD.

File

cron/hosting_cron.module, line 12
Allow the hosting system to cron all the installed sites on a schedule.

Code

function hosting_cron_hosting_queues() {
  $items['cron'] = array(
    'type' => HOSTING_QUEUE_TYPE_BATCH,
    'name' => t('Cron queue'),
    'description' => t('Run cron on hosted sites.'),
    'total_items' => hosting_site_count(),
    'frequency' => strtotime("1 hour", 0),
    'min_threads' => 6,
    'max_threads' => 12,
    'threshold' => 100,
    'singular' => t('site'),
    'plural' => t('sites'),
  );
  return $items;
}