mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-15 19:22:19 +08:00
This commit is contained in:
parent
a5c9823495
commit
9e22c9a428
|
@ -360,6 +360,8 @@ function getPlanByPriceId(price_id: string): PlanType {
|
|||
return "growthdouble";
|
||||
case process.env.STRIPE_PRICE_ID_ETIER2C:
|
||||
return "etier2c";
|
||||
case process.env.STRIPE_PRICE_ID_ETIER1A_MONTHLY: //ocqh
|
||||
return "etier1a";
|
||||
default:
|
||||
return "free";
|
||||
}
|
||||
|
|
|
@ -74,6 +74,10 @@ export async function getJobPriority({
|
|||
bucketLimit = 1000;
|
||||
planModifier = 0.05;
|
||||
break;
|
||||
case "etier1a":
|
||||
bucketLimit = 1000;
|
||||
planModifier = 0.05;
|
||||
break;
|
||||
|
||||
default:
|
||||
bucketLimit = 25;
|
||||
|
|
|
@ -16,6 +16,7 @@ const RATE_LIMITS = {
|
|||
growth: 50,
|
||||
growthdouble: 50,
|
||||
etier2c: 300,
|
||||
etier1a: 1000,
|
||||
},
|
||||
scrape: {
|
||||
default: 20,
|
||||
|
@ -30,6 +31,7 @@ const RATE_LIMITS = {
|
|||
growth: 1000,
|
||||
growthdouble: 1000,
|
||||
etier2c: 2500,
|
||||
etier1a: 1000,
|
||||
},
|
||||
search: {
|
||||
default: 20,
|
||||
|
@ -44,6 +46,7 @@ const RATE_LIMITS = {
|
|||
growth: 500,
|
||||
growthdouble: 500,
|
||||
etier2c: 2500,
|
||||
etier1a: 1000,
|
||||
},
|
||||
map:{
|
||||
default: 20,
|
||||
|
@ -58,6 +61,7 @@ const RATE_LIMITS = {
|
|||
growth: 500,
|
||||
growthdouble: 500,
|
||||
etier2c: 2500,
|
||||
etier1a: 1000,
|
||||
},
|
||||
preview: {
|
||||
free: 5,
|
||||
|
@ -123,6 +127,13 @@ export const scrapeStatusRateLimiter = new RateLimiterRedis({
|
|||
duration: 60, // Duration in seconds
|
||||
});
|
||||
|
||||
export const etier1aRateLimiter = new RateLimiterRedis({
|
||||
storeClient: redisRateLimitClient,
|
||||
keyPrefix: "etier1a",
|
||||
points: 10000,
|
||||
duration: 60, // Duration in seconds
|
||||
});
|
||||
|
||||
const testSuiteTokens = [
|
||||
"a01ccae",
|
||||
"6254cf9",
|
||||
|
@ -176,6 +187,10 @@ export function getRateLimiter(
|
|||
if(teamId && teamId === process.env.DEV_B_TEAM_ID) {
|
||||
return devBRateLimiter;
|
||||
}
|
||||
|
||||
if(teamId && teamId === process.env.ETIER1A_TEAM_ID) {
|
||||
return etier1aRateLimiter;
|
||||
}
|
||||
|
||||
if(teamId && manual.includes(teamId)) {
|
||||
return manualRateLimiter;
|
||||
|
|
|
@ -158,6 +158,7 @@ export type PlanType =
|
|||
| "growth"
|
||||
| "growthdouble"
|
||||
| "etier2c"
|
||||
| "etier1a"
|
||||
| "free"
|
||||
| "";
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user