You are here

public function MonitoringCommands::rebuild in Monitoring 8

Rebuild the list of sensors.

@validate-module-enabled monitoring

@command monitoring:rebuild @aliases monitoring-rebuild

File

src/Commands/MonitoringCommands.php, line 356

Class

MonitoringCommands
A Drush commandfile for the Monitoring module.

Namespace

Drupal\monitoring\Commands

Code

public function rebuild() {
  $this->sensorManager
    ->rebuildSensors();

  /* @noinspection PhpUndefinedMethodInspection */
  $this
    ->logger()
    ->success(dt('Sensors rebuilt.'));
}