mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 04:04:45 +02:00
Fix FindViableNodeService
to actually filter Tags
(#1080)
* fix viable node service to take into account tags * Update app/Services/Deployment/FindViableNodesService.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --------- Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
This commit is contained in:
parent
e93d122a27
commit
7f0c7da37f
@ -29,7 +29,7 @@ class FindViableNodesService
|
|||||||
->get();
|
->get();
|
||||||
|
|
||||||
return $nodes
|
return $nodes
|
||||||
->filter(fn (Node $node) => !$tags || collect($node->tags)->intersect($tags))
|
->filter(fn (Node $node) => !$tags || collect($node->tags)->intersect($tags)->isNotEmpty())
|
||||||
->filter(fn (Node $node) => $node->isViable($memory, $disk, $cpu));
|
->filter(fn (Node $node) => $node->isViable($memory, $disk, $cpu));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user