You are here

function hosting_task_status in Hostmaster (Aegir) 6

Return the status of the task matching the specification

1 call to hosting_task_status()
hosting_task_status_output in modules/hosting/task/hosting_task.module
Return the status of a task in human-readable form

File

modules/hosting/task/hosting_task.module, line 903
Web server node type is defined here.

Code

function hosting_task_status($filter_by, $filter_value, $type = 'install') {
  $args[] = 'task';
  $args[] = $type;
  $cond = '';
  if ($filter_by && $filter_value) {
    $cond = ' AND t.' . $filter_by . ' = %d';
    $args[] = $filter_value;
  }
  $result = db_fetch_array(db_query("SELECT t.task_status AS status FROM {node} n INNER JOIN {hosting_task} t on n.vid=t.vid WHERE n.type='%s' AND t.task_type='%s' " . $cond . " ORDER BY t.vid DESC", $args));
  return $result['status'];
}