pause.hosting.inc

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

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.

File

pause.hosting.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Drush include for the Hosting module's hosting pause command.
  5. */
  6. /**
  7. * Make sure Aegir is ready to be upgraded.
  8. */
  9. function drush_hosting_pause_validate($url) {
  10. // Wait for the task queue to be processed and tasks to complete.
  11. while (hosting_task_count() + hosting_task_count_running() > 0) {
  12. drush_log(dt('Waiting for the task queue to be processed and tasks to complete.'), 'message');
  13. sleep(1);
  14. }
  15. }
  16. /**
  17. * Drush command to pause the Aegir frontend queues.
  18. *
  19. * This is really just deleting our code from the crontab.
  20. */
  21. function drush_hosting_pause($url) {
  22. // Wipe out cron entry.
  23. _hosting_setup_cron($add = FALSE);
  24. }