Returns the queue object for a given name.
The following variables can be set by variable_set or $conf overrides:
$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.
The queue object for a given name.
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];
}