Update queue.ts

This commit is contained in:
Nicolas 2024-08-23 22:15:47 -03:00
parent 28d7a637c2
commit 8e78511ed4

View File

@ -110,7 +110,9 @@ export async function autoscalerController(req: Request, res: Response) {
}
)
const machines = await request.json();
const activeMachines = machines.filter(machine => machine.state === 'started' || machine.state === "starting").length;
// Only worker machines
const activeMachines = machines.filter(machine => (machine.state === 'started' || machine.state === "starting") && machine.config.env["FLY_PROCESS_GROUP"] === "worker").length;
let targetMachineCount = activeMachines;