QueueInterface::claimItem

public QueueInterface::claimItem($lease_time = 3600) Claims an item in the queue for processing. Parameters $lease_time: How long the processing is expected to take in seconds, defaults to an hour. After this lease expires, the item will be reset and another consumer can claim the item. For idempotent tasks (which can be run multiple times without side effects), shorter lease times would result in lower latency in case a consumer fails. For tasks that should not be run more than once (non-idem

QueueInterface

Interface for a queue. Classes implementing this interface will do a best effort to preserve order in messages and to execute them at least once. Hierarchy interface \Drupal\Core\Queue\QueueInterface Related topics Queue operations Queue items to allow later processing. File core/lib/Drupal/Core/Queue/QueueInterface.php, line 13 Namespace Drupal\Core\Queue Members Name Modifiers Type Description QueueInterface::claimItem public function Claims an item in the queue for

QueueGarbageCollectionInterface::garbageCollection

public QueueGarbageCollectionInterface::garbageCollection() Cleans queues of garbage. File core/lib/Drupal/Core/Queue/QueueGarbageCollectionInterface.php, line 16 Class QueueGarbageCollectionInterface If the Drupal 'queue' service implements this interface, the garbageCollection() method will be called during cron. Namespace Drupal\Core\Queue Code public function garbageCollection();

QueueGarbageCollectionInterface

If the Drupal 'queue' service implements this interface, the garbageCollection() method will be called during cron. Hierarchy interface \Drupal\Core\Queue\QueueGarbageCollectionInterface See also system_cron() File core/lib/Drupal/Core/Queue/QueueGarbageCollectionInterface.php, line 11 Namespace Drupal\Core\Queue Members Name Modifiers Type Description QueueGarbageCollectionInterface::garbageCollection public function Cleans queues of garbage.

QueueFactory::__construct

QueueFactory::__construct(Settings $settings) Constructs a queue factory. File core/lib/Drupal/Core/Queue/QueueFactory.php, line 34 Class QueueFactory Defines the queue factory. Namespace Drupal\Core\Queue Code function __construct(Settings $settings) { $this->settings = $settings; }

QueueFactory::get

public QueueFactory::get($name, $reliable = FALSE) Constructs a new queue. Parameters string $name: The name of the queue to work with. bool $reliable: (optional) TRUE if the ordering of items and guaranteeing every item executes at least once is important, FALSE if scalability is the main concern. Defaults to FALSE. Return value \Drupal\Core\Queue\QueueInterface A queue implementation for the given name. File core/lib/Drupal/Core/Queue/QueueFactory.php, line 51 Class QueueFactory Define

QueueFactory::$settings

The settings object. Type: \Drupal\Core\Site\Settings File core/lib/Drupal/Core/Queue/QueueFactory.php, line 28 Class QueueFactory Defines the queue factory. Namespace Drupal\Core\Queue Code protected $settings;

QueueFactory::$queues

Instantiated queues, keyed by name. Type: array File core/lib/Drupal/Core/Queue/QueueFactory.php, line 21 Class QueueFactory Defines the queue factory. Namespace Drupal\Core\Queue Code protected $queues = array();

QueueFactory

Defines the queue factory. Hierarchy class \Drupal\Core\Queue\QueueFactory implements ContainerAwareInterface uses ContainerAwareTrait File core/lib/Drupal/Core/Queue/QueueFactory.php, line 12 Namespace Drupal\Core\Queue Members Name Modifiers Type Description ContainerAwareTrait::$container protected property ContainerAwareTrait::setContainer public function Sets the container. Overrides ContainerAwareInterface::setContainer QueueFactory::$queues protected

Queue operations

Queue items to allow later processing. The queue system allows placing items in a queue and processing them later. The system tries to ensure that only one consumer can process an item. Before a queue can be used it needs to be created by Drupal\Core\Queue\QueueInterface::createQueue(). Items can be added to the queue by passing an arbitrary data object to Drupal\Core\Queue\QueueInterface::createItem(). To process an item, call Drupal\Core\Queue\QueueInterface::claimItem() and specify how long