You are here

function hosting_task_hosting_queues in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 task/hosting_task.module \hosting_task_hosting_queues()
  2. 7.4 task/hosting_task.module \hosting_task_hosting_queues()

Implements hook_hosting_queues().

Return a list of queues that this module needs to manage.

File

task/hosting_task.module, line 475
Web server node type is defined here.

Code

function hosting_task_hosting_queues() {
  $queue['tasks'] = array(
    'name' => t('Task queue'),
    'description' => t('Process the queue of outstanding hosting tasks.'),
    'type' => 'serial',
    // Run queue sequentially. always with the same parameters.
    'frequency' => strtotime("1 minute", 0),
    # run queue every minute.
    'items' => 5,
    # process 20 queue items per execution.
    'total_items' => hosting_task_count(),
    'singular' => t('task'),
    'plural' => t('tasks'),
    'running_items' => hosting_task_count_running(),
  );
  return $queue;
}