Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes
This commit is contained in:
parent
1a0e9d9fac
commit
a6b049dd05
538 changed files with 5247 additions and 1594 deletions
|
@ -10,18 +10,21 @@ namespace Drupal\Core\Annotation;
|
|||
use Drupal\Component\Annotation\Plugin;
|
||||
|
||||
/**
|
||||
* Declare queue workers that need to be run periodically.
|
||||
* Declare a worker class for processing a queue item.
|
||||
*
|
||||
* While there can be only one hook_cron() process running at the same time,
|
||||
* there can be any number of processes defined here running. Because of
|
||||
* this, long running tasks are much better suited for this API. Items queued
|
||||
* in hook_cron() might be processed in the same cron run if there are not many
|
||||
* items in the queue, otherwise it might take several requests, which can be
|
||||
* run in parallel.
|
||||
* 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).
|
||||
*
|
||||
* 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.
|
||||
* \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: you can create queues, add items to
|
||||
* them, claim them, etc. without using a QueueWorker plugin. However, you will
|
||||
* need to take care of processing the items in the queue in that case. You can
|
||||
* look at \Drupal\Core\Cron::processQueues() for an example of how to process
|
||||
* a queue that uses workers, and adapt it to your queue.
|
||||
*
|
||||
* Plugin Namespace: Plugin\QueueWorker
|
||||
*
|
||||
|
|
Reference in a new issue