You are here

function hosting_task_retry in Hosting 7.3

Same name and namespace in other branches
  1. 5 task/hosting_task.module \hosting_task_retry()
  2. 6.2 task/hosting_task.module \hosting_task_retry()
  3. 7.4 task/hosting_task.module \hosting_task_retry()

Retry the given task

2 calls to hosting_task_retry()
hosting_site_update_2 in site/hosting_site.install
Implements hook_update_N().
hosting_task_retry_form_submit in task/hosting_task.module
Submit handler for the task retry button.

File

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

Code

function hosting_task_retry($task_id) {
  $node = node_load($task_id);
  if ($node->task_status != HOSTING_TASK_QUEUED) {
    drupal_set_message(t("The task is being retried and has been added to the hosting queue again"));
    hosting_task_log($node->vid, 'queue', t("The task is being retried and has been added to the hosting queue again"));
    $node->nid = NULL;
    $node->vid = NULL;
    $node->original = NULL;
    $node->revision = TRUE;
    $node->created = REQUEST_TIME;
    $node->changed = REQUEST_TIME;
    $node->task_status = HOSTING_TASK_QUEUED;
    node_save($node);
    drupal_goto("node/{$node->nid}");
  }
}