Update queue.ts
This commit is contained in:
@@ -88,7 +88,7 @@ export async function queuesController(req: Request, res: Response) {
|
|||||||
|
|
||||||
export async function autoscalerController(req: Request, res: Response) {
|
export async function autoscalerController(req: Request, res: Response) {
|
||||||
try {
|
try {
|
||||||
const maxNumberOfMachines = 100;
|
const maxNumberOfMachines = 80;
|
||||||
const minNumberOfMachines = 20;
|
const minNumberOfMachines = 20;
|
||||||
|
|
||||||
const scrapeQueue = getScrapeQueue();
|
const scrapeQueue = getScrapeQueue();
|
||||||
@@ -110,7 +110,7 @@ export async function autoscalerController(req: Request, res: Response) {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
const machines = await request.json();
|
const machines = await request.json();
|
||||||
|
|
||||||
// Only worker machines
|
// Only worker machines
|
||||||
const activeMachines = machines.filter(machine => (machine.state === 'started' || machine.state === "starting") && machine.config.env["FLY_PROCESS_GROUP"] === "worker").length;
|
const activeMachines = machines.filter(machine => (machine.state === 'started' || machine.state === "starting") && machine.config.env["FLY_PROCESS_GROUP"] === "worker").length;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user