Verified Commit d92acc38 authored by Dave Long's avatar Dave Long
Browse files

Issue #2264943 by FeyP, er.pushpinderrana, _pratik_, gauravkhambhala,...

Issue #2264943 by FeyP, er.pushpinderrana, _pratik_, gauravkhambhala, Weilinggu, Nikhil_110, joachim, jhodgdon: Queue API topic and hook_queue_info() don't link to one another

(cherry picked from commit 4b781a54)
parent 43b75043
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1806,6 +1806,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().
 *
@@ -1830,6 +1831,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
@@ -1923,6 +1925,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:
@@ -1982,6 +1986,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
+4 −2
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
 * @see \Drupal\Core\Queue\QueueWorkerManager
 * @see plugin_api
 *
 * @ingroup queue
 *
 * @Annotation
 */
class QueueWorker extends Plugin {
@@ -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;

+2 −0
Original line number Diff line number Diff line
@@ -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 {

+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@
 * @see \Drupal\Core\Queue\QueueWorkerManager
 * @see \Drupal\Core\Annotation\QueueWorker
 * @see plugin_api
 *
 * @ingroup queue
 */
interface QueueWorkerInterface extends PluginInspectionInterface {