Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9cb0e23e
Commit
9cb0e23e
authored
Jan 04, 2016
by
Nathaniel Catchpole
Browse files
Issue
#2359037
by jhodgdon, chx: QueueWorker plugin id is the queue name
parent
42eb466c
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Annotation/QueueWorker.php
View file @
9cb0e23e
...
...
@@ -10,18 +10,21 @@
use
Drupal\Component\Annotation\Plugin
;
/**
* Declare
queue
worker
s 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
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment