public function SystemQueue::numberOfItems

cis7 public SystemQueue::numberOfItems()
cle7 public SystemQueue::numberOfItems()
elmsmedia7 public SystemQueue::numberOfItems()
icor7 public SystemQueue::numberOfItems()
meedjum_blog7 public SystemQueue::numberOfItems()
mooc7 public SystemQueue::numberOfItems()

Retrieve the number of items in the queue.

This is intended to provide a "best guess" count of the number of items in the queue. Depending on the implementation and the setup, the accuracy of the results of this function may vary.

e.g. On a busy system with a large number of consumers and items, the result might only be valid for a fraction of a second and not provide an accurate representation.

Return value

An integer estimate of the number of items in the queue.

Overrides DrupalQueueInterface::numberOfItems


modules/system/, line 224
Queue functionality.


Default queue implementation.


public function numberOfItems() {
  return db_query('SELECT COUNT(item_id) FROM {queue} WHERE name = :name', array(':name' => $this->name))->fetchField();



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.