:100755 100755 5253f1ecf 000000000 M alerts.php :100644 100644 465ca3d0b 000000000 M app/Console/Commands/AlertsNotify.php :100644 100644 574bc9de2 000000000 M tests/Feature/AlertNotificationsTest.php diff --git a/alerts.php b/alerts.php index 5253f1ecfbdbbebceff85e540d8a8b2f8bbc15c9..94195ded1d7def0271ca886b1d29609515f53dac 100755 --- a/alerts.php +++ b/alerts.php @@ -37,7 +37,7 @@ c_echo('%RWarning: alerts.php is deprecated!%n Use %9lnms alerts:notify%n instea $arguments = []; -if (!isset($options['f'])) { +if (! isset($options['f'])) { $arguments['--scheduler'] = 'cron'; } diff --git a/app/Console/Commands/AlertsNotify.php b/app/Console/Commands/AlertsNotify.php index 465ca3d0b5b44161cb252651d3bcf4816623284d..4eae1edd4264938add3d426b7e37fb0d01d790f0 100644 --- a/app/Console/Commands/AlertsNotify.php +++ b/app/Console/Commands/AlertsNotify.php @@ -49,15 +49,15 @@ class AlertsNotify extends LnmsCommand $alerts_lock = Cache::lock('alerts', LibrenmsConfig::get('service_alerting_frequency')); if ($alerts_lock->get()) { $alerts = new AlertNotifications(); - if (!LibrenmsConfig::get('alert.disable')) { + if (! LibrenmsConfig::get('alert.disable')) { $this->line('Start: ' . date('r')); $this->line('ClearStaleAlerts():'); $alerts->clearStaleAlerts(); - $this->line("RunFollowUp():"); + $this->line('RunFollowUp():'); $alerts->runFollowUp(); - $this->line("AlertNotifications():"); + $this->line('AlertNotifications():'); $alerts->runAlerts(); - $this->line("RunAcks():"); + $this->line('RunAcks():'); $alerts->runAcks(); $this->line('End : ' . date('r')); } diff --git a/tests/Feature/AlertNotificationsTest.php b/tests/Feature/AlertNotificationsTest.php index 574bc9de2c86e06d1350eeaa680eae0884ed7c40..a461854243fde7f175947ebcdd26fb15f08973e7 100644 --- a/tests/Feature/AlertNotificationsTest.php +++ b/tests/Feature/AlertNotificationsTest.php @@ -1,4 +1,5 @@