You are here

function hosting_tasks_queue in Hosting 6.2

Same name and namespace in other branches
  1. 5 hosting.queues.inc \hosting_tasks_queue()
  2. 7.4 task/hosting_task.module \hosting_tasks_queue()
  3. 7.3 task/hosting_task.module \hosting_tasks_queue()

Process the hosting task queue.

Iterates through the list of outstanding tasks, and execute the commands on the back end.

File

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

Code

function hosting_tasks_queue($count = 20) {
  global $provision_errors;
  drush_log(dt("Running tasks queue"));
  $tasks = _hosting_get_new_tasks($count);
  foreach ($tasks as $task) {
    drush_invoke_process('@self', "hosting-task", array(
      $task->nid,
    ), array(
      'strict' => FALSE,
    ), array(
      'fork' => TRUE,
    ));
  }
}