You are here

public function AdvancedQueue::deleteItem in Advanced Queue 7

Delete a finished item from the queue.

Parameters

$item: The item returned by DrupalQueueInterface::claimItem().

Overrides DrupalQueueInterface::deleteItem

File

./advancedqueue.queue.inc, line 140

Class

AdvancedQueue
Extended queue.

Code

public function deleteItem($item) {
  db_update('advancedqueue')
    ->fields(array(
    'expire' => 0,
    'status' => isset($item->status) ? $item->status : ADVANCEDQUEUE_STATUS_SUCCESS,
    'result' => serialize(isset($item->result) ? $item->result : array()),
    'processed' => time(),
  ))
    ->condition('item_id', $item->item_id)
    ->execute();
}