public function AcquiaPurgeQueueEfficient::deleteItemMultiple in Acquia Purge 7
Delete multiple items from the queue at once.
Parameters
array $items: Non-associative array with item objects as returned by claimItemMultiple() or DrupalQueueInterface::claimItem().
Overrides AcquiaPurgeQueueInterface::deleteItemMultiple
File
- lib/
queue/ AcquiaPurgeQueueEfficient.php, line 205 - Contains EfficientQueue.
Class
- AcquiaPurgeQueueEfficient
- Efficient query bundling database queue.
Code
public function deleteItemMultiple(array $items) {
if (empty($items)) {
return;
}
$item_ids = array();
foreach ($items as $item) {
$item_ids[] = $item->item_id;
}
db_delete('queue')
->condition('item_id', $item_ids, 'IN')
->execute();
$this
->good()
->increase(count($item_ids));
}