mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 14:24:46 +02:00
Always limit by nodes, was like this before anyways
This commit is contained in:
parent
48f715ae69
commit
5b9e4b1729
@ -90,11 +90,10 @@ class AllocationSelectionService
|
|||||||
*/
|
*/
|
||||||
private function getRandomAllocation(array $nodes = [], array $ports = [], bool $dedicated = false): ?Allocation
|
private function getRandomAllocation(array $nodes = [], array $ports = [], bool $dedicated = false): ?Allocation
|
||||||
{
|
{
|
||||||
$query = Allocation::query()->whereNull('server_id');
|
$query = Allocation::query()
|
||||||
|
->whereNull('server_id')
|
||||||
if (!empty($nodes)) {
|
->whereIn('node_id', $nodes)
|
||||||
$query->whereIn('node_id', $nodes);
|
;
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($ports)) {
|
if (!empty($ports)) {
|
||||||
$query->where(function ($inner) use ($ports) {
|
$query->where(function ($inner) use ($ports) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user