diff --git a/app/Jobs/AddressIdle.php b/app/Jobs/AddressIdle.php index 02c5d4d..a7cd73f 100644 --- a/app/Jobs/AddressIdle.php +++ b/app/Jobs/AddressIdle.php @@ -196,6 +196,7 @@ class AddressIdle implements ShouldQueue return collect(); $age = Carbon::now()->subDays($days)->endOfDay(); + $ours = our_address($do)->pluck('ftn'); return Address::FTN() ->ActiveFTN() @@ -208,6 +209,7 @@ class AddressIdle implements ShouldQueue ->whereRaw(sprintf('((role IS NULL) OR ((role & %d) = 0))',Address::NODE_KEEP)) ->join('systems',['systems.id'=>'addresses.system_id']) //->with(['system','zone.domain']) - ->get(); + ->get() + ->filter(fn($item)=>$ours->contains($item->parent()?->ftn)); } } \ No newline at end of file