public function BatchMemoryQueue::claimItem in Drupal 7
Overrides MemoryQueue::claimItem().
Unlike MemoryQueue::claimItem(), this method provides a default lease time of 0 (no expiration) instead of 30. This allows the item to be claimed repeatedly until it is deleted.
Overrides MemoryQueue::claimItem
File
- includes/
batch.queue.inc, line 64 - Queue handlers used by the Batch API.
Class
- BatchMemoryQueue
- Defines a batch queue for non-progressive batches.
Code
public function claimItem($lease_time = 0) {
if (!empty($this->queue)) {
reset($this->queue);
return current($this->queue);
}
return FALSE;
}