function drush_acquia_purge_ap_forget in Acquia Purge 7
Same name and namespace in other branches
- 6 acquia_purge.drush.inc \drush_acquia_purge_ap_forget()
Forget all scheduled purges and empty the queue.
File
- ./
acquia_purge.drush.inc, line 240 - Drush integration providing common maintenance tasks.
Code
function drush_acquia_purge_ap_forget() {
$service = _acquia_purge_service();
// Stop invocation if we are not detecting Acquia Cloud heuristics.
if (!$service
->hostingInfo()
->isThisAcquiaCloud()) {
return drush_set_error("You must be on Acquia Cloud to use Acquia Purge.");
}
// Retrieve statistics, clear the queue and log to Drush.
$remaining = $service
->stats('remaining');
$service
->clear();
$service
->oddities()
->wipe();
drush_log(dt("Removed @remaining items from the queue.", array(
'@remaining' => $remaining,
)), 'ok');
}