public static function DrupalQueue::get

cis7 system.queue.inc public static DrupalQueue::get($name, $reliable = FALSE)
cle7 system.queue.inc public static DrupalQueue::get($name, $reliable = FALSE)
elmsmedia7 system.queue.inc public static DrupalQueue::get($name, $reliable = FALSE)
icor7 system.queue.inc public static DrupalQueue::get($name, $reliable = FALSE)
meedjum_blog7 system.queue.inc public static DrupalQueue::get($name, $reliable = FALSE)
mooc7 system.queue.inc public static DrupalQueue::get($name, $reliable = FALSE)

Returns the queue object for a given name.

The following variables can be set by variable_set or $conf overrides:

  • queue_class_$name: the class to be used for the queue $name.
  • queue_default_class: the class to use when queue_class_$name is not defined. Defaults to SystemQueue, a reliable backend using SQL.
  • queue_default_reliable_class: the class to use when queue_class_$name is not defined and the queue_default_class is not reliable. Defaults to SystemQueue.

Parameters

$name: Arbitrary string. The name of the queue to work with.

$reliable: TRUE if the ordering of items and guaranteeing every item executes at least once is important, FALSE if scalability is the main concern.

Return value

The queue object for a given name.

18 calls to DrupalQueue::get()
aggregator_cron in modules/aggregator/aggregator.module
Implements hook_cron().
apc_init in sites/all/modules/ulmus/apc/apc.module
Implementation of hook_init().
boost_crawler_expire_cache in sites/all/modules/ulmus/boost/boost_crawler/boost_crawler.module
Implements hook_expire_cache (from the 'expire' module)
DrupalAPCCache::clear in sites/all/modules/ulmus/apc/drupal_apc_cache.inc
Expires data from the cache.
drupal_cron_run in includes/common.inc
Executes a cron run when called.

... See full list

File

modules/system/system.queue.inc, line 81
Queue functionality.

Class

DrupalQueue
Factory class for interacting with queues.

Code

public static function get($name, $reliable = FALSE) {
  static $queues;
  if (!isset($queues[$name])) {
    $class = variable_get('queue_class_' . $name, NULL);
    if (!$class) {
      $class = variable_get('queue_default_class', 'SystemQueue');
    }
    $object = new $class($name);
    if ($reliable && !$object instanceof DrupalReliableQueueInterface) {
      $class = variable_get('queue_default_reliable_class', 'SystemQueue');
      $object = new $class($name);
    }
    $queues[$name] = $object;
  }
  return $queues[$name];
}
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.