function hosting_task_outstanding in Hosting 5
Same name and namespace in other branches
- 6.2 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.
2 calls to hosting_task_outstanding()
- hosting_platform_hosting_tasks in platform/
hosting_platform.module - Implementation of hook_hosting_tasks
- hosting_site_hosting_tasks in site/
hosting_site.module - implementation of hook_hosting_tasks
File
- task/
hosting_task.module, line 167 - Web server node type is defined here.
Code
function hosting_task_outstanding($nid, $type) {
$return = db_result(db_query("\n SELECT q.nid FROM \n {hosting_task_queue} q LEFT JOIN {hosting_task} a ON a.nid=q.nid \n WHERE \n a.rid = %d \n AND q.status = 1 \n AND a.task_type = '%s' \n LIMIT 1", $nid, $type));
return $return;
}