From 90c65fd5e176178336a12a5480721f3b3b485fe1 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 12 Jun 2024 23:12:51 +1000 Subject: [PATCH] Dont attempt to process System::default systems when processing address:idle --- app/Jobs/AddressIdle.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Jobs/AddressIdle.php b/app/Jobs/AddressIdle.php index 8f7214a..143d016 100644 --- a/app/Jobs/AddressIdle.php +++ b/app/Jobs/AddressIdle.php @@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Notification; use App\Classes\FTN\Message; -use App\Models\{Address,Domain}; +use App\Models\{Address,Domain,System}; use App\Notifications\Echomails\AbsentNodes; use App\Notifications\Emails\NodeMarkedDown as NodeMarkedDownEmail; use App\Notifications\Netmails\NodeMarkedDown as NodeMarkedDownNetmail; @@ -132,6 +132,12 @@ class AddressIdle implements ShouldQueue // Mark nodes as HOLD foreach ($this->old($this->do,config('fido.idle.hold'),0,$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)); + continue; + } + // Ignore any systems already marked hold or down if ($ao->role & (Address::NODE_DOWN|Address::NODE_HOLD)) continue;