$dispatcher
$dispatcher : \Drupal\strata\Event\Webhook\WebhookDispatcher
Posts one queued webhook delivery.
The delay is enforced here rather than by the queue backend, because the database queue core
ships cannot hold an item until a moment - DelayableQueueInterface is implemented by some
backends and not that one. An item that is not due yet is re-queued untouched, which costs one
cheap read and keeps the backoff honest on every backend.
$dispatcher : \Drupal\strata\Event\Webhook\WebhookDispatcher
__construct(array$configuration, string $pluginId, mixed $pluginDefinition, \Drupal\strata\Event\Webhook\WebhookDispatcher $dispatcher, \Drupal\Component\Datetime\TimeInterface $time, \Psr\Log\LoggerInterface $logger) : mixed
Constructs a worker.
| array |
$configuration | Plugin configuration. |
| string | $pluginId | The plugin id. |
| mixed | $pluginDefinition | The plugin definition. |
| \Drupal\strata\Event\Webhook\WebhookDispatcher | $dispatcher | Performs the attempt. |
| \Drupal\Component\Datetime\TimeInterface | $time | Decides whether an item is due. |
| \Psr\Log\LoggerInterface | $logger | Records a delivery that failed in a way the dispatcher did not expect. |
create(\Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, mixed $plugin_id, mixed $plugin_definition) : self
{@inheritdoc}
| \Symfony\Component\DependencyInjection\ContainerInterface | $container | |
| array | $configuration | |
| mixed | $plugin_id | |
| mixed | $plugin_definition |
processItem(mixed $data) : void
{@inheritdoc}
Everything below the requeue is caught, including an Error. Cron::processQueues() catches
Exception and nothing wider, so a TypeError raised by a malformed item does not fail that
item - it aborts the whole cron run, and every module whose cron had not gone yet is skipped
for as long as the lock is held. A webhook that cannot be delivered is not worth that.
| mixed | $data | The queue item. |
When the item is not due yet. Thrown past the catch, since it is how a worker says "later" rather than a failure.