mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-16 20:35:54 +08:00
Nick: bucket limit increase
This commit is contained in:
parent
f0dfcd6a49
commit
ca34f1203b
@ -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";
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user