function Memory::claimItem
Same name in other branches
- 9 core/lib/Drupal/Core/Queue/Memory.php \Drupal\Core\Queue\Memory::claimItem()
- 10 core/lib/Drupal/Core/Queue/Memory.php \Drupal\Core\Queue\Memory::claimItem()
- 11.x core/lib/Drupal/Core/Queue/Memory.php \Drupal\Core\Queue\Memory::claimItem()
Overrides QueueInterface::claimItem
1 method overrides Memory::claimItem()
- BatchMemory::claimItem in core/
lib/ Drupal/ Core/ Queue/ BatchMemory.php - Overrides \Drupal\Core\Queue\Memory::claimItem().
File
-
core/
lib/ Drupal/ Core/ Queue/ Memory.php, line 63
Class
- Memory
- Static queue implementation.
Namespace
Drupal\Core\QueueCode
public function claimItem($lease_time = 30) {
foreach ($this->queue as $key => $item) {
if ($item->expire == 0) {
$item->expire = time() + $lease_time;
$this->queue[$key] = $item;
return $item;
}
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.