Nick: etier1a

This commit is contained in:
Nicolas
2024-11-04 18:14:38 -05:00
parent a5c9823495
commit 9e22c9a428
4 changed files with 22 additions and 0 deletions
+2
View File
@@ -360,6 +360,8 @@ function getPlanByPriceId(price_id: string): PlanType {
return "growthdouble"; return "growthdouble";
case process.env.STRIPE_PRICE_ID_ETIER2C: case process.env.STRIPE_PRICE_ID_ETIER2C:
return "etier2c"; return "etier2c";
case process.env.STRIPE_PRICE_ID_ETIER1A_MONTHLY: //ocqh
return "etier1a";
default: default:
return "free"; return "free";
} }
+4
View File
@@ -74,6 +74,10 @@ export async function getJobPriority({
bucketLimit = 1000; bucketLimit = 1000;
planModifier = 0.05; planModifier = 0.05;
break; break;
case "etier1a":
bucketLimit = 1000;
planModifier = 0.05;
break;
default: default:
bucketLimit = 25; bucketLimit = 25;
+15
View File
@@ -16,6 +16,7 @@ const RATE_LIMITS = {
growth: 50, growth: 50,
growthdouble: 50, growthdouble: 50,
etier2c: 300, etier2c: 300,
etier1a: 1000,
}, },
scrape: { scrape: {
default: 20, default: 20,
@@ -30,6 +31,7 @@ const RATE_LIMITS = {
growth: 1000, growth: 1000,
growthdouble: 1000, growthdouble: 1000,
etier2c: 2500, etier2c: 2500,
etier1a: 1000,
}, },
search: { search: {
default: 20, default: 20,
@@ -44,6 +46,7 @@ const RATE_LIMITS = {
growth: 500, growth: 500,
growthdouble: 500, growthdouble: 500,
etier2c: 2500, etier2c: 2500,
etier1a: 1000,
}, },
map:{ map:{
default: 20, default: 20,
@@ -58,6 +61,7 @@ const RATE_LIMITS = {
growth: 500, growth: 500,
growthdouble: 500, growthdouble: 500,
etier2c: 2500, etier2c: 2500,
etier1a: 1000,
}, },
preview: { preview: {
free: 5, free: 5,
@@ -123,6 +127,13 @@ export const scrapeStatusRateLimiter = new RateLimiterRedis({
duration: 60, // Duration in seconds duration: 60, // Duration in seconds
}); });
export const etier1aRateLimiter = new RateLimiterRedis({
storeClient: redisRateLimitClient,
keyPrefix: "etier1a",
points: 10000,
duration: 60, // Duration in seconds
});
const testSuiteTokens = [ const testSuiteTokens = [
"a01ccae", "a01ccae",
"6254cf9", "6254cf9",
@@ -177,6 +188,10 @@ export function getRateLimiter(
return devBRateLimiter; return devBRateLimiter;
} }
if(teamId && teamId === process.env.ETIER1A_TEAM_ID) {
return etier1aRateLimiter;
}
if(teamId && manual.includes(teamId)) { if(teamId && manual.includes(teamId)) {
return manualRateLimiter; return manualRateLimiter;
} }
+1
View File
@@ -158,6 +158,7 @@ export type PlanType =
| "growth" | "growth"
| "growthdouble" | "growthdouble"
| "etier2c" | "etier2c"
| "etier1a"
| "free" | "free"
| ""; | "";