Fixes for DE-LIST notifications
This commit is contained in:
@@ -51,8 +51,8 @@ class AddressIdle implements ShouldQueue
|
||||
// Delist DOWN nodes
|
||||
foreach ($this->old($this->do,config('fido.idle.delist'),Address::NODE_DOWN,$this->ao) as $ao) {
|
||||
// Only delist system that has been marked down
|
||||
// Only mark delist them if its been 7 days since they were marked DOWN
|
||||
if ((! $ao->is_down) || ($ao->updated_at->isPast(Carbon::now()->subWeek())))
|
||||
// Only mark delist them if its been 14 days since they were marked DOWN
|
||||
if ((! $ao->is_down) || ($ao->updated_at->greaterThan(Carbon::now()->subWeeks(2))))
|
||||
continue;
|
||||
|
||||
Log::info(sprintf('%s:- Delisting [%s], not seen for [%d] days',self::LOGKEY,$ao->ftn,config('fido.idle.delist')));
|
||||
@@ -130,8 +130,9 @@ class AddressIdle implements ShouldQueue
|
||||
$result->push($ao);
|
||||
}
|
||||
|
||||
// @todo Make sure we only process addresses that we are responsible for, eg: 1/999 shouldnt have been processed even though 3/999 as eligible (and they are were connected to the same system)
|
||||
// Mark nodes as HOLD
|
||||
foreach ($this->old($this->do,config('fido.idle.hold'),0,$this->ao) as $ao) {
|
||||
foreach ($this->old($this->do,config('fido.idle.hold'),Address::NODE_ALL,$this->ao) as $ao) {
|
||||
// Ignore any systems that are a Discoverd System
|
||||
if ($ao->system->name === System::default) {
|
||||
Log::alert(sprintf('%s:! Ignoring HOLD for discovered System [%s]',self::LOGKEY,$ao->ftn));
|
||||
|
Reference in New Issue
Block a user