Nick: fixed rate limit on status
This commit is contained in:
parent
0ec26576d6
commit
e37aa3db57
@ -41,8 +41,8 @@ const RATE_LIMITS = {
|
||||
default: 5,
|
||||
},
|
||||
account: {
|
||||
free: 20,
|
||||
default: 20,
|
||||
free: 100,
|
||||
default: 100,
|
||||
},
|
||||
crawlStatus: {
|
||||
free: 150,
|
||||
@ -82,11 +82,13 @@ export function getRateLimiter(
|
||||
token: string,
|
||||
plan?: string
|
||||
) {
|
||||
|
||||
if (token.includes("a01ccae") || token.includes("6254cf9")) {
|
||||
return testSuiteRateLimiter;
|
||||
}
|
||||
|
||||
const rateLimitConfig = RATE_LIMITS[mode]; // {default : 5}
|
||||
|
||||
if (!rateLimitConfig) return serverRateLimiter;
|
||||
|
||||
const planKey = plan ? plan.replace("-", "") : "default"; // "default"
|
||||
|
@ -45,7 +45,7 @@ export interface FirecrawlJob {
|
||||
|
||||
export enum RateLimiterMode {
|
||||
Crawl = "crawl",
|
||||
CrawlStatus = "crawl-status",
|
||||
CrawlStatus = "crawlStatus",
|
||||
Scrape = "scrape",
|
||||
Preview = "preview",
|
||||
Search = "search",
|
||||
|
Loading…
Reference in New Issue
Block a user