mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#12343)
This commit is contained in:
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
namespace LibreNMS\Exceptions;
|
namespace LibreNMS\Exceptions;
|
||||||
|
|
||||||
|
|
||||||
class InvalidNameException extends \Exception
|
class InvalidNameException extends \Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -70,6 +70,7 @@ class DistributedPoller extends BaseValidation
|
|||||||
if (PollerCluster::isActive()->exists()) {
|
if (PollerCluster::isActive()->exists()) {
|
||||||
$validator->info('Detected Dispatcher Service');
|
$validator->info('Detected Dispatcher Service');
|
||||||
$this->checkDispatcherService($validator);
|
$this->checkDispatcherService($validator);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,13 +99,13 @@ class DistributedPoller extends BaseValidation
|
|||||||
$node = PollerCluster::firstWhere('node_id', config('librenms.node_id'));
|
$node = PollerCluster::firstWhere('node_id', config('librenms.node_id'));
|
||||||
if (! $node->exists) {
|
if (! $node->exists) {
|
||||||
$validator->fail('Dispatcher service is enabled on your cluster, but not in use on this node');
|
$validator->fail('Dispatcher service is enabled on your cluster, but not in use on this node');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($node->last_report->lessThan(Carbon::now()->subSeconds($node->getSettingValue('poller_frequency')))) {
|
if ($node->last_report->lessThan(Carbon::now()->subSeconds($node->getSettingValue('poller_frequency')))) {
|
||||||
$validator->fail('Dispatcher service has not reported stats within the last poller window');
|
$validator->fail('Dispatcher service has not reported stats within the last poller window');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkPythonWrapper(Validator $validator)
|
private function checkPythonWrapper(Validator $validator)
|
||||||
|
Reference in New Issue
Block a user