You are here

function hosting_task_count in Hosting 7.4

Same name and namespace in other branches
  1. 5 task/hosting_task.module \hosting_task_count()
  2. 6.2 task/hosting_task.module \hosting_task_count()
  3. 7.3 task/hosting_task.module \hosting_task_count()

Return the amount of items still in the queue.

1 call to hosting_task_count()
hosting_task_hosting_queues in task/hosting_task.module
Implements hook_hosting_queues().

File

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

Code

function hosting_task_count() {
  $result = db_query("SELECT COUNT(t.vid) FROM {hosting_task} t INNER JOIN {node} n ON t.vid = n.vid WHERE t.task_status = :task_status", array(
    ':task_status' => HOSTING_TASK_QUEUED,
  ))
    ->fetchField();
  return $result;
}