You are here

public function Predis::releaseItem in Redis 8

Releases an item that the worker could not process.

Another worker can come in and process it before the timeout expires.

Parameters

$item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().

Return value

bool TRUE if the item has been released, FALSE otherwise.

Overrides QueueInterface::releaseItem

File

src/Queue/Predis.php, line 104

Class

Predis
Redis queue implementation using Predis library backend.

Namespace

Drupal\redis\Queue

Code

public function releaseItem($item) {
  $this->client
    ->lrem($this->claimedListKey, -1, $item->qid);
  $this->client
    ->lpush($this->availableListKey, $item->qid);
}