You are here

public function PhpRedis::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/PhpRedis.php, line 105

Class

PhpRedis
Redis queue implementation using PhpRedis extension backend.

Namespace

Drupal\redis\Queue

Code

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