Skip to content

Commit 0010375

Browse files
committed
More MarQS upgrades
- Extract the queue priortity choosing strategy into an interface - Implement a much better weighted average strategy - “Slide the window” of queue candidates if the parent queue sends all at-capacity queues (so we won’t get stuck attempting to choose the same 12 full queues) - Added some unit tests for the priority stuff - Added some ideas for expanding the priority choosing strategy with more dynamic features
1 parent 6c62fa4 commit 0010375

22 files changed

+1291
-159
lines changed

apps/webapp/app/routes/admin.api.v1.environments.$environmentId.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ActionFunctionArgs, json } from "@remix-run/server-runtime";
22
import { z } from "zod";
33
import { prisma } from "~/db.server";
44
import { authenticateApiRequestWithPersonalAccessToken } from "~/services/personalAccessToken.server";
5-
import { marqs } from "~/v3/marqs.server";
5+
import { marqs } from "~/v3/marqs/index.server";
66

77
const ParamsSchema = z.object({
88
environmentId: z.string(),
@@ -60,7 +60,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
6060
},
6161
});
6262

63-
await marqs?.updateGlobalConcurrencyLimits(environment);
63+
await marqs?.updateEnvConcurrencyLimits(environment);
6464

6565
return json({ success: true });
6666
}

apps/webapp/app/v3/marqs/devQueueConsumer.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { AuthenticatedEnvironment } from "~/services/apiAuth.server";
1313
import { logger } from "~/services/logger.server";
1414
import { EnvironmentVariablesRepository } from "../environmentVariables/environmentVariablesRepository.server";
1515
import { generateFriendlyId } from "../friendlyIdentifiers";
16-
import { marqs } from "../marqs.server";
16+
import { marqs } from "~/v3/marqs/index.server";
1717
import { CancelAttemptService } from "../services/cancelAttempt.server";
1818
import { CompleteAttemptService } from "../services/completeAttempt.server";
1919
import { attributesFromAuthenticatedEnv } from "../tracer.server";

0 commit comments

Comments
 (0)