public function MemoryQueue::releaseItem

public MemoryQueue::releaseItem($item)

Release an item that the worker could not process, so another worker can come in and process it before the timeout expires.

Parameters

$item:

Return value

boolean

Overrides DrupalQueueInterface::releaseItem

File

modules/system/system.queue.inc, line 351
Queue functionality.

Class

MemoryQueue
Static queue implementation.

Code

public function releaseItem($item) {
  if (isset($this->queue[$item->item_id]) && $this->queue[$item->item_id]->expire != 0) {
    $this->queue[$item->item_id]->expire = 0;
    return TRUE;
  }
  return FALSE;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.queue.inc/function/MemoryQueue::releaseItem/7.x