function DelayableQueueInterface::delayItem
Same name in other branches
- 9 core/lib/Drupal/Core/Queue/DelayableQueueInterface.php \Drupal\Core\Queue\DelayableQueueInterface::delayItem()
- 10 core/lib/Drupal/Core/Queue/DelayableQueueInterface.php \Drupal\Core\Queue\DelayableQueueInterface::delayItem()
Delay an item so it runs in the future.
Parameters
object $item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().
int $delay: A delay before the item's lock should expire (in seconds). Relative to the current time, not the item's current expiry.
Return value
bool TRUE if the item has been updated, FALSE otherwise.
Throws
\InvalidArgumentException When a negative $delay is provided; $delay must be non-negative.
See also
\Drupal\Core\Queue\QueueInterface::releaseItem() To immediately release an item without delay.
1 method overrides DelayableQueueInterface::delayItem()
- DatabaseQueue::delayItem in core/
lib/ Drupal/ Core/ Queue/ DatabaseQueue.php - Delay an item so it runs in the future.
File
-
core/
lib/ Drupal/ Core/ Queue/ DelayableQueueInterface.php, line 32
Class
- DelayableQueueInterface
- Delayable queue interface.
Namespace
Drupal\Core\QueueCode
public function delayItem($item, int $delay);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.