You are here

public function AdvancedQueue::requeueItem in Advanced Queue 7

Requeue an item in case of failure.

File

./advancedqueue.queue.inc, line 118

Class

AdvancedQueue
Extended queue.

Code

public function requeueItem($item) {
  $update = db_update('advancedqueue')
    ->fields(array(
    'expire' => 0,
    'status' => ADVANCEDQUEUE_STATUS_QUEUED,
    'created' => $item->created,
    'data' => serialize($item->data),
  ))
    ->condition('item_id', $item->item_id);
  return $update
    ->execute();
}