You are here

pause.hosting.inc in Hosting 6.2

Same filename and directory in other branches
  1. 7.4 pause.hosting.inc
  2. 7.3 pause.hosting.inc

Drush include for the Hosting module's hosting pause command.

File

pause.hosting.inc
View source
<?php

/**
 * @file
 *   Drush include for the Hosting module's hosting pause command.
 */

/**
 * Make sure Aegir is ready to be upgraded.
 */
function drush_hosting_pause_validate($url) {

  // Wait for the task queue to be processed and tasks to complete.
  while (hosting_task_count() + hosting_task_count_running() > 0) {
    drush_log(dt('Waiting for the task queue to be processed and tasks to complete.'), 'message');
    sleep(1);
  }
}

/**
 * Drush command to pause the Aegir frontend queues.
 *
 * This is really just deleting the crontab.
 */
function drush_hosting_pause($url) {

  // wipe out cron entry
  exec('crontab -r');
}

Functions

Namesort descending Description
drush_hosting_pause Drush command to pause the Aegir frontend queues.
drush_hosting_pause_validate Make sure Aegir is ready to be upgraded.