function hosting_task_gc_count_sites in Hosting 7.4
Same name and namespace in other branches
- 7.3 task_gc/hosting_task_gc.module \hosting_task_gc_count_sites()
Get the number of sites with garbage to collect.
Return value
int The number of sites.
1 call to hosting_task_gc_count_sites()
- hosting_task_gc_hosting_queues in task_gc/
hosting_task_gc.module - Implements hook_hosting_queues().
File
- task_gc/
hosting_task_gc.module, line 83 - Module code for Hosting task garbage collection
Code
function hosting_task_gc_count_sites() {
$query = "SELECT COUNT(DISTINCT s.nid) AS num_sites " . "FROM {hosting_site} s INNER JOIN {hosting_task} t ON s.nid = t.rid " . "WHERE s.status = :status";
return db_query($query, array(
':status' => HOSTING_SITE_DELETED,
))
->fetchField();
}