summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/batch.queue.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/batch.queue.inc b/includes/batch.queue.inc
index 8193280f3..ee721463f 100644
--- a/includes/batch.queue.inc
+++ b/includes/batch.queue.inc
@@ -21,7 +21,7 @@
class BatchQueue extends SystemQueue {
public function claimItem($lease_time = 0) {
- $item = db_query('SELECT data, item_id FROM {queue} q WHERE name = :name ORDER BY item_id ASC', array(':name' => $this->name))->fetchObject();
+ $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;