public function MongoDBQueue::releaseItem in MongoDB 7
Release an item that the worker could not process.
Parameters
object $item: The item to release.
Return value
bool Did the update succeed?
Throws
\MongoConnectionException
\MongoCursorException
Overrides DrupalQueueInterface::releaseItem
File
- mongodb_queue/
mongodb_queue.inc, line 111 - Contains \MongoDBQueue.
Class
Code
public function releaseItem($item) {
return mongodb_collection($this->collection)
->update(array(
'_id' => $item->_id,
), array(
'$set' => array(
'expire' => 0,
),
), mongodb_default_write_options());
}