Improvements to finding idle nodes, last_session actually only shows the last time the remote polled us
This commit is contained in:
@@ -51,7 +51,7 @@ 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 14 days since they were marked DOWN
|
||||
// Only 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;
|
||||
|
||||
@@ -106,6 +106,11 @@ class AddressIdle implements ShouldQueue
|
||||
|
||||
// Mark nodes DOWN
|
||||
foreach ($this->old($this->do,config('fido.idle.down'),Address::NODE_HOLD,$this->ao) as $ao) {
|
||||
// Only mark down system that has been marked down
|
||||
// Only mark down them if its been 14 days since they were marked HOLD
|
||||
if ((! $ao->is_hold) || ($ao->updated_at->greaterThan(Carbon::now()->subWeeks(2))))
|
||||
continue;
|
||||
|
||||
Log::info(sprintf('%s:- Marking [%s] as DOWN, not seen for [%d] days',self::LOGKEY,$ao->ftn,config('fido.idle.down')));
|
||||
$contact = FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user