public function DelayableQueueInterface::delayItem in Drupal 10
Same name and namespace in other branches
- 9 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.
To immediately release an item without delay.
See also
\Drupal\Core\Queue\QueueInterface::releaseItem()
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);