Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DelayableQueueInterface.php

function 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()

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\Queue

Code

public function delayItem($item, int $delay);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal