You are here

function drush_acquia_purge_ap_list in Acquia Purge 6

Same name and namespace in other branches
  1. 7 acquia_purge.drush.inc \drush_acquia_purge_ap_list()

List all the items that are in the queue.

File

./acquia_purge.drush.inc, line 185
Drush integration providing common maintenance tasks.

Code

function drush_acquia_purge_ap_list() {

  // Stop invocation if we are not detecting Acquia Cloud heuristics.
  if (!_acquia_purge_are_we_on_acquiacloud()) {
    return drush_set_error("You must be on Acquia Cloud to use Acquia Purge.");
  }

  // Directly query the queue table and print all records.
  $items = db_query('SELECT path FROM {ap_queue}');
  while ($item = db_fetch_array($items)) {
    printf(" - '%s'\n", current($item));
  }
}