1 batch.queue.inc public BatchMemoryQueue::claimItem($lease_time = 0)

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

core/includes/batch.queue.inc, line 63
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;
}