function hosting_task_outstanding in Hostmaster (Aegir) 6
Determine whether there is an outstanding task of a specific type.
This is used to ensure that there are not multiple tasks of the same type queued.
1 call to hosting_task_outstanding()
- hosting_task_menu_access in modules/
hosting/ task/ hosting_task.module - Task access controls
File
- modules/
hosting/ task/ hosting_task.module, line 518 - Web server node type is defined here.
Code
function hosting_task_outstanding($nid, $type) {
$return = db_result(db_query("\n SELECT t.nid FROM {hosting_task} t\n INNER JOIN {node} n ON t.vid = n.vid\n WHERE\n t.rid = %d\n AND t.task_status = %d\n AND t.task_type = '%s'\n ORDER BY t.vid DESC\n LIMIT 1", $nid, HOSTING_TASK_QUEUED, $type));
return $return;
}