QueueWorker::$title

The human-readable title of the plugin. Type: \Drupal\Core\Annotation\Translation Related topics Annotation for translatable text Describes how to put translatable UI text into annotations. File core/lib/Drupal/Core/Annotation/QueueWorker.php, line 52 Class QueueWorker Declare a worker class for processing a queue item. Namespace Drupal\Core\Annotation Code public $title;

QueueWorker::$id

The plugin ID. Type: string File core/lib/Drupal/Core/Annotation/QueueWorker.php, line 43 Class QueueWorker Declare a worker class for processing a queue item. Namespace Drupal\Core\Annotation Code public $id;

QueueWorker::$cron

An associative array containing the optional key: time: (optional) How much time Drupal cron should spend on calling this worker in seconds. Defaults to 15. Type: array (optional) File core/lib/Drupal/Core/Annotation/QueueWorker.php, line 61 Class QueueWorker Declare a worker class for processing a queue item. Namespace Drupal\Core\Annotation Code public $cron;

QueueWorker

Declare a worker class for processing a queue item. Worker plugins are used by some queues for processing the individual items in the queue. In that case, the ID of the worker plugin needs to match the machine name of a queue, so that you can retrieve the queue back end by calling \Drupal\Core\Queue\QueueFactory::get($plugin_id). \Drupal\Core\Cron::processQueues() processes queues that use workers; they can also be processed outside of the cron process. Some queues do not use worker plugins: yo

QueueInterface::releaseItem

public QueueInterface::releaseItem($item) Releases an item that the worker could not process. Another worker can come in and process it before the timeout expires. Parameters $item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem(). Return value bool TRUE if the item has been released, FALSE otherwise. File core/lib/Drupal/Core/Queue/QueueInterface.php, line 90 Class QueueInterface Interface for a queue. Namespace Drupal\Core\Queue Code public function releaseItem($

QueueInterface::numberOfItems

public QueueInterface::numberOfItems() Retrieves 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

QueueInterface::deleteQueue

public QueueInterface::deleteQueue() Deletes a queue and every item in the queue. File core/lib/Drupal/Core/Queue/QueueInterface.php, line 108 Class QueueInterface Interface for a queue. Namespace Drupal\Core\Queue Code public function deleteQueue();

QueueInterface::deleteItem

public QueueInterface::deleteItem($item) Deletes a finished item from the queue. Parameters $item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem(). File core/lib/Drupal/Core/Queue/QueueInterface.php, line 77 Class QueueInterface Interface for a queue. Namespace Drupal\Core\Queue Code public function deleteItem($item);

QueueInterface::createQueue

public QueueInterface::createQueue() Creates a queue. Called during installation and should be used to perform any necessary initialization operations. This should not be confused with the constructor for these objects, which is called every time an object is instantiated to operate on a queue. This operation is only needed the first time a given queue is going to be initialized (for example, to make a new database table or directory to hold tasks for the queue -- it depends on the queue implem

QueueInterface::createItem

public QueueInterface::createItem($data) Adds a queue item and store it directly to the queue. Parameters $data: Arbitrary data to be associated with the new task in the queue. Return value A unique ID if the item was successfully created and was (best effort) added to the queue, otherwise FALSE. We don't guarantee the item was committed to disk etc, but as far as we know, the item is now in the queue. File core/lib/Drupal/Core/Queue/QueueInterface.php, line 27 Class QueueInterface Inter