function drush_acquia_purge_ap_list in Acquia Purge 7
Same name and namespace in other branches
- 6 acquia_purge.drush.inc \drush_acquia_purge_ap_list()
List all the items that are in the queue.
File
- ./
acquia_purge.drush.inc, line 259 - 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_service()
->hostingInfo()
->isThisAcquiaCloud()) {
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_select('queue', 'q')
->fields("q", array(
"data",
))
->condition('name', 'acquia_purge')
->execute();
while ($item = $items
->fetchAssoc()) {
if ($item = unserialize(current($item))) {
printf(" - '%s'\n", current($item));
}
}
}