Limit address idle only to addresses where we are the parent
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 29s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m31s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-11-06 22:44:21 +11:00
parent 1075cc0de4
commit 21d3ff5918

View File

@ -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));
}
}