Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Nick: bucket limit increase

Nicolasca34f1203b41
diff --git a/apps/api/src/lib/__tests__/job-priority.test.ts b/apps/api/src/lib/__tests__/job-priority.test.ts
index 5a30f92e4..82477379e 100644
--- a/apps/api/src/lib/__tests__/job-priority.test.ts
+++ b/apps/api/src/lib/__tests__/job-priority.test.ts
@@ -50,11 +50,11 @@ describe("Job Priority Tests", () => {
(redisConnection.scard as jest.Mock).mockResolvedValue(150);
const priority = await getJobPriority({ plan, team_id });
- expect(priority).toBe(20);
+ expect(priority).toBe(10);
(redisConnection.scard as jest.Mock).mockResolvedValue(250);
const priorityExceeded = await getJobPriority({ plan, team_id });
- expect(priorityExceeded).toBe(40); // basePriority + Math.ceil((250 - 200) * 0.2)
+ expect(priorityExceeded).toBe(20); // basePriority + Math.ceil((250 - 200) * 0.4)
});
test("getJobPriority should handle different plans correctly", async () => {
@@ -68,7 +68,7 @@ describe("Job Priority Tests", () => {
(redisConnection.scard as jest.Mock).mockResolvedValue(150);
plan = "hobby";
priority = await getJobPriority({ plan, team_id });
- expect(priority).toBe(40); // basePriority + Math.ceil((150 - 50) * 0.3)
+ expect(priority).toBe(25); // basePriority + Math.ceil((150 - 50) * 0.3)
(redisConnection.scard as jest.Mock).mockResolvedValue(25);
plan = "free";
diff --git a/apps/api/src/lib/job-priority.ts b/apps/api/src/lib/job-priority.ts
index c4744d7bd..1d311cfb1 100644
--- a/apps/api/src/lib/job-priority.ts
+++ b/apps/api/src/lib/job-priority.ts
@@ -53,17 +53,17 @@ export async function getJobPriority({
planModifier = 0.5;
break;
case "hobby":
- bucketLimit = 50;
+ bucketLimit = 100;
planModifier = 0.3;
break;
case "standard":
case "standardnew":
- bucketLimit = 100;
+ bucketLimit = 200;
planModifier = 0.2;
break;
case "growth":
case "growthdouble":
- bucketLimit = 200;
+ bucketLimit = 400;
planModifier = 0.2;
break;