function hosting_task_outstanding in Hosting 6.2
Same name and namespace in other branches
- 5 task/hosting_task.module \hosting_task_outstanding()
- 7.4 task/hosting_task.module \hosting_task_outstanding()
- 7.3 task/hosting_task.module \hosting_task_outstanding()
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 task/
hosting_task.module - Task access controls
File
- task/
hosting_task.module, line 530 - 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;
}