Handle delisting when last_seen is blank (node hasnt polled)
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 51s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 2m0s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-09-29 13:16:23 +10:00
parent 494cb317d1
commit b8f0b11c05

View File

@ -59,7 +59,7 @@ class AddressIdle implements ShouldQueue
continue;
// Validate that the last seen was infact that long ago
if ($ao->system->last_seen->greaterThan($age))
if ($ao->system->last_seen && $ao->system->last_seen->greaterThan($age))
continue;
Log::info(sprintf('%s:- Delisting [%s], not seen for [%d] days',self::LOGKEY,$ao->ftn,config('fido.idle.delist')));
@ -123,7 +123,7 @@ class AddressIdle implements ShouldQueue
continue;
// Validate that the last seen was infact that long ago
if ($ao->system->last_seen->greaterThan($age))
if ($ao->system->last_seen && $ao->system->last_seen->greaterThan($age))
continue;
Log::info(sprintf('%s:- Marking [%s] as DOWN, not seen for [%d] days',self::LOGKEY,$ao->ftn,config('fido.idle.down')));
@ -168,7 +168,7 @@ class AddressIdle implements ShouldQueue
continue;
// Validate that the last seen was infact that long ago
if ($ao->system->last_seen->greaterThan($age))
if ($ao->system->last_seen && $ao->system->last_seen->greaterThan($age))
continue;
$contact = FALSE;