diff --git a/core/lib/Drupal/Core/Annotation/QueueWorker.php b/core/lib/Drupal/Core/Annotation/QueueWorker.php index 5409f4e..85a2296 100644 --- a/core/lib/Drupal/Core/Annotation/QueueWorker.php +++ b/core/lib/Drupal/Core/Annotation/QueueWorker.php @@ -19,9 +19,9 @@ * items in the queue, otherwise it might take several requests, which can be * run in parallel. * - * You can create queues, add items to them, claim them, etc without declaring - * the queue in this hook if you want, however, you need to take care of - * processing the items in the queue in that case. + * You can create queues, add items to them, claim them, etc. without using a + * QueueWorker plugin if you want, however, you need to take care of processing + * the items in the queue in that case. See \Drupal\Core\Cron for an example. * * Plugin Namespace: Plugin\QueueWorker * diff --git a/core/lib/Drupal/Core/Queue/QueueWorkerInterface.php b/core/lib/Drupal/Core/Queue/QueueWorkerInterface.php index ee4124a..be6e335 100644 --- a/core/lib/Drupal/Core/Queue/QueueWorkerInterface.php +++ b/core/lib/Drupal/Core/Queue/QueueWorkerInterface.php @@ -27,18 +27,19 @@ * \Drupal\Core\Queue\QueueInterface::createItem() when the item was queued. * * @throws \Exception - * The worker callback may throw an exception to indicate there was a + * A QueueWorker plugin may throw an exception to indicate there was a * problem. The cron process will log the exception, and leave the item in * the queue to be processed again later. * @throws \Drupal\Core\Queue\SuspendQueueException - * More specifically, a SuspendQueueException should be thrown when the - * callback is aware that the problem will affect all subsequent workers of - * its queue. For example, a callback that makes HTTP requests may find that - * the remote server is not responding. The cron process will behave as with - * a normal Exception, and in addition will not attempt to process further - * items from the current item's queue during the current cron run. + * More specifically, a SuspendQueueException should be thrown when a + * QueueWorker plugin is aware that the problem will affect all subsequent + * workers of its queue. For example, a callback that makes HTTP requests + * may find that the remote server is not responding. The cron process will + * behave as with a normal Exception, and in addition will not attempt to + * process further items from the current item's queue during the current + * cron run. * - * @see \Drupal\Core\Cron::run() + * @see \Drupal\Core\Cron::processQueues() */ public function processItem($data);