mirror of
https://github.com/pelican-dev/panel.git
synced 2025-03-14 09:57:36 +00: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:
@ -29,7 +29,7 @@ class FindViableNodesService
|
||||
->get();
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user