public function PendingSensorPlugin::runSensor in Simplenews 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/monitoring/SensorPlugin/PendingSensorPlugin.php \Drupal\simplenews\Plugin\monitoring\SensorPlugin\PendingSensorPlugin::runSensor()
- 8 src/Plugin/monitoring/SensorPlugin/PendingSensorPlugin.php \Drupal\simplenews\Plugin\monitoring\SensorPlugin\PendingSensorPlugin::runSensor()
File
- src/
Plugin/ monitoring/ SensorPlugin/ PendingSensorPlugin.php, line 29
Class
- PendingSensorPlugin
- Monitors pending items in the simplenews mail spool.
Namespace
Drupal\simplenews\Plugin\monitoring\SensorPluginCode
public function runSensor(SensorResultInterface $result) {
$result
->setValue(\Drupal::service('simplenews.spool_storage')
->countMails([
'status' => SpoolStorageInterface::STATUS_PENDING,
]));
}