You are here

function hosting_task_task_has_finished in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 task/hosting_task.module \hosting_task_task_has_finished()

Determine if the given task has finished and completed.

Parameters

$task: The task node to check.

Return value

bool True if task has finished, false otherwise.

2 calls to hosting_task_task_has_finished()
hosting_task_log_ajax in task/hosting_task.module
Read additional task log data, served via AJAX.
_hosting_task_log_table in task/hosting_task.module
Display table containing the logged information for this task.

File

task/hosting_task.module, line 142
Web server node type is defined here.

Code

function hosting_task_task_has_finished($task) {

  // Check to see if the execution time of task has been set, and if it has
  // allow an additional 30 seconds for the logs to be entered into the DB.
  return !empty($task->delta) && $task->executed + $task->delta + 30 < REQUEST_TIME;
}