interface QueueWorkerInterface implements PluginInspectionInterface (View source)

Defines an interface for a QueueWorker plugin.

Methods

string
getPluginId()

Gets the plugin_id of the plugin instance.

array
getPluginDefinition()

Gets the definition of the plugin implementation.

processItem(mixed $data)

Works on a single queue item.

Details

string getPluginId()

Gets the plugin_id of the plugin instance.

Return Value

string

The plugin_id of the plugin instance.

array getPluginDefinition()

Gets the definition of the plugin implementation.

Return Value

array

The plugin definition, as returned by the discovery object used by the plugin manager.

processItem(mixed $data)

Works on a single queue item.

Parameters

mixed $data

The data that was passed to \Drupal\Core\Queue\QueueInterface::createItem() when the item was queued.

Exceptions

RequeueException
Exception
SuspendQueueException

See also

Cron::processQueues