Loading core/core.api.php +6 −0 Original line number Diff line number Diff line Loading @@ -1798,6 +1798,7 @@ * 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. * * @section create_queues Creating queues * Before a queue can be used it needs to be created by * Drupal\Core\Queue\QueueInterface::createQueue(). * Loading @@ -1822,6 +1823,7 @@ * needs to be passed to Drupal\Core\Queue\QueueInterface::deleteItem() once * processing is completed. * * @section queue_backends Queue backends * There are two kinds of queue backends available: reliable, which preserves * the order of messages and guarantees that every item will be executed at * least once. The non-reliable kind only does a best effort to preserve order Loading Loading @@ -1914,6 +1916,8 @@ * instead of executing the tasks directly. To do this, first define one or * more queues via a \Drupal\Core\Annotation\QueueWorker plugin. Then, add items * that need to be processed to the defined queues. * * @see queue */ function hook_cron() { // Short-running operation example, not using a queue: Loading Loading @@ -1973,6 +1977,8 @@ function hook_data_type_info_alter(&$data_types) { * @see \Drupal\Core\Queue\QueueWorkerInterface * @see \Drupal\Core\Annotation\QueueWorker * @see \Drupal\Core\Cron * * @ingroup queue */ function hook_queue_info_alter(&$queues) { // This site has many feeds so let's spend 90 seconds on each cron run Loading core/lib/Drupal/Core/Annotation/QueueWorker.php +4 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ * @see \Drupal\Core\Queue\QueueWorkerManager * @see plugin_api * * @ingroup queue * * @Annotation */ class QueueWorker extends Plugin { Loading @@ -45,9 +47,9 @@ class QueueWorker extends Plugin { /** * The human-readable title of the plugin. * * @ingroup plugin_translatable * * @var \Drupal\Core\Annotation\Translation * * @ingroup plugin_translatable */ public $title; Loading core/lib/Drupal/Core/Queue/QueueWorkerBase.php +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ * @see \Drupal\Core\Queue\QueueWorkerManager * @see \Drupal\Core\Annotation\QueueWorker * @see plugin_api * * @ingroup queue */ abstract class QueueWorkerBase extends PluginBase implements QueueWorkerInterface { Loading core/lib/Drupal/Core/Queue/QueueWorkerInterface.php +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ * @see \Drupal\Core\Queue\QueueWorkerManager * @see \Drupal\Core\Annotation\QueueWorker * @see plugin_api * * @ingroup queue */ interface QueueWorkerInterface extends PluginInspectionInterface { Loading Loading
core/core.api.php +6 −0 Original line number Diff line number Diff line Loading @@ -1798,6 +1798,7 @@ * 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. * * @section create_queues Creating queues * Before a queue can be used it needs to be created by * Drupal\Core\Queue\QueueInterface::createQueue(). * Loading @@ -1822,6 +1823,7 @@ * needs to be passed to Drupal\Core\Queue\QueueInterface::deleteItem() once * processing is completed. * * @section queue_backends Queue backends * There are two kinds of queue backends available: reliable, which preserves * the order of messages and guarantees that every item will be executed at * least once. The non-reliable kind only does a best effort to preserve order Loading Loading @@ -1914,6 +1916,8 @@ * instead of executing the tasks directly. To do this, first define one or * more queues via a \Drupal\Core\Annotation\QueueWorker plugin. Then, add items * that need to be processed to the defined queues. * * @see queue */ function hook_cron() { // Short-running operation example, not using a queue: Loading Loading @@ -1973,6 +1977,8 @@ function hook_data_type_info_alter(&$data_types) { * @see \Drupal\Core\Queue\QueueWorkerInterface * @see \Drupal\Core\Annotation\QueueWorker * @see \Drupal\Core\Cron * * @ingroup queue */ function hook_queue_info_alter(&$queues) { // This site has many feeds so let's spend 90 seconds on each cron run Loading
core/lib/Drupal/Core/Annotation/QueueWorker.php +4 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ * @see \Drupal\Core\Queue\QueueWorkerManager * @see plugin_api * * @ingroup queue * * @Annotation */ class QueueWorker extends Plugin { Loading @@ -45,9 +47,9 @@ class QueueWorker extends Plugin { /** * The human-readable title of the plugin. * * @ingroup plugin_translatable * * @var \Drupal\Core\Annotation\Translation * * @ingroup plugin_translatable */ public $title; Loading
core/lib/Drupal/Core/Queue/QueueWorkerBase.php +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ * @see \Drupal\Core\Queue\QueueWorkerManager * @see \Drupal\Core\Annotation\QueueWorker * @see plugin_api * * @ingroup queue */ abstract class QueueWorkerBase extends PluginBase implements QueueWorkerInterface { Loading
core/lib/Drupal/Core/Queue/QueueWorkerInterface.php +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ * @see \Drupal\Core\Queue\QueueWorkerManager * @see \Drupal\Core\Annotation\QueueWorker * @see plugin_api * * @ingroup queue */ interface QueueWorkerInterface extends PluginInspectionInterface { Loading