function hosting_tasks_queue in Hosting 7.4
Same name and namespace in other branches
- 5 hosting.queues.inc \hosting_tasks_queue()
- 6.2 task/hosting_task.module \hosting_tasks_queue()
- 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 754 - Web server node type is defined here.
Code
function hosting_tasks_queue($count = 20) {
global $provision_errors;
$tasks = hosting_get_new_tasks($count);
if (count($tasks)) {
drush_log(dt("Found @count tasks (max @max) in queue. Running...", array(
'@count' => count($tasks),
'@max' => $count,
)), "ok");
}
else {
drush_log(dt("Found no tasks in queue. Not running."), "ok");
}
foreach ($tasks as $task) {
hosting_task_execute($task, array(
'fork' => drush_get_option('fork', TRUE),
));
}
}