public function BatchQueue::claimItem

cis7 batch.queue.inc public BatchQueue::claimItem($lease_time = 0)
cle7 batch.queue.inc public BatchQueue::claimItem($lease_time = 0)
elmsmedia7 batch.queue.inc public BatchQueue::claimItem($lease_time = 0)
icor7 batch.queue.inc public BatchQueue::claimItem($lease_time = 0)
meedjum_blog7 batch.queue.inc public BatchQueue::claimItem($lease_time = 0)
mooc7 batch.queue.inc public BatchQueue::claimItem($lease_time = 0)

Overrides SystemQueue::claimItem().

Unlike SystemQueue::claimItem(), this method provides a default lease time of 0 (no expiration) instead of 30. This allows the item to be claimed repeatedly until it is deleted.

File

includes/batch.queue.inc, line 28
Queue handlers used by the Batch API.

Class

BatchQueue
Defines a batch queue.

Code

public function claimItem($lease_time = 0) {
  $item = db_query_range('SELECT data, item_id FROM {queue} q WHERE name = :name ORDER BY item_id ASC', 0, 1, array(':name' => $this->name))->fetchObject();
  if ($item) {
    $item->data = unserialize($item->data);
    return $item;
  }
  return FALSE;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.