Handle delisting when last_seen is blank (node hasnt polled)
This commit is contained in:
parent
494cb317d1
commit
b8f0b11c05
@ -59,7 +59,7 @@ class AddressIdle implements ShouldQueue
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Validate that the last seen was infact that long ago
|
// 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;
|
continue;
|
||||||
|
|
||||||
Log::info(sprintf('%s:- Delisting [%s], not seen for [%d] days',self::LOGKEY,$ao->ftn,config('fido.idle.delist')));
|
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;
|
continue;
|
||||||
|
|
||||||
// Validate that the last seen was infact that long ago
|
// 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;
|
continue;
|
||||||
|
|
||||||
Log::info(sprintf('%s:- Marking [%s] as DOWN, not seen for [%d] days',self::LOGKEY,$ao->ftn,config('fido.idle.down')));
|
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;
|
continue;
|
||||||
|
|
||||||
// Validate that the last seen was infact that long ago
|
// 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;
|
continue;
|
||||||
|
|
||||||
$contact = FALSE;
|
$contact = FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user