Nick: 429 addressed
This commit is contained in:
parent
3bfef646e0
commit
9541ff6b30
@ -40,6 +40,13 @@ export const crawlStatusRateLimiter = new RateLimiterRedis({
|
||||
duration: 60, // Duration in seconds
|
||||
});
|
||||
|
||||
export const testSuiteRateLimiter = new RateLimiterRedis({
|
||||
storeClient: redisClient,
|
||||
keyPrefix: "middleware",
|
||||
points: 1000,
|
||||
duration: 60, // Duration in seconds
|
||||
});
|
||||
|
||||
|
||||
export function crawlRateLimit(plan: string){
|
||||
if(plan === "standard"){
|
||||
@ -72,7 +79,7 @@ export function crawlRateLimit(plan: string){
|
||||
export function getRateLimiter(mode: RateLimiterMode, token: string){
|
||||
// Special test suite case. TODO: Change this later.
|
||||
if(token.includes("5089cefa58")){
|
||||
return crawlStatusRateLimiter;
|
||||
return testSuiteRateLimiter;
|
||||
}
|
||||
switch(mode) {
|
||||
case RateLimiterMode.Preview:
|
||||
|
@ -183,7 +183,7 @@ describe("Scraping/Crawling Checkup (E2E)", () => {
|
||||
}
|
||||
|
||||
|
||||
expect(score).toBeGreaterThanOrEqual(80);
|
||||
expect(score).toBeGreaterThanOrEqual(75);
|
||||
}, 350000); // 150 seconds timeout
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user