mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-08 13:29:02 +08:00
Nick: auth extract
This commit is contained in:
parent
81c347f538
commit
382476cb36
@ -94,7 +94,7 @@ export async function getACUC(
|
||||
let retries = 0;
|
||||
const maxRetries = 5;
|
||||
|
||||
let rpcName = mode === RateLimiterMode.Extract ? "auth_credit_usage_chunk_extract" : "auth_credit_usage_chunk_test_21_credit_pack_n_extract";
|
||||
let rpcName = mode === RateLimiterMode.Extract || mode === RateLimiterMode.ExtractStatus ? "auth_credit_usage_chunk_extract" : "auth_credit_usage_chunk_test_21_credit_pack_n_extract";
|
||||
while (retries < maxRetries) {
|
||||
({ data, error } = await supabase_service.rpc(
|
||||
rpcName,
|
||||
@ -129,8 +129,6 @@ export async function getACUC(
|
||||
setCachedACUC(api_key, chunk);
|
||||
}
|
||||
|
||||
// console.log(chunk);
|
||||
|
||||
return chunk;
|
||||
} else {
|
||||
return null;
|
||||
|
@ -228,7 +228,7 @@ v1Router.post(
|
||||
|
||||
v1Router.get(
|
||||
"/extract/:jobId",
|
||||
authMiddleware(RateLimiterMode.CrawlStatus),
|
||||
authMiddleware(RateLimiterMode.ExtractStatus),
|
||||
wrap(extractStatusController),
|
||||
);
|
||||
|
||||
|
@ -100,6 +100,10 @@ const RATE_LIMITS = {
|
||||
free: 500,
|
||||
default: 5000,
|
||||
},
|
||||
extractStatus: {
|
||||
free: 500,
|
||||
default: 5000,
|
||||
},
|
||||
testSuite: {
|
||||
free: 10000,
|
||||
default: 10000,
|
||||
|
@ -134,6 +134,7 @@ export enum RateLimiterMode {
|
||||
Search = "search",
|
||||
Map = "map",
|
||||
Extract = "extract",
|
||||
ExtractStatus = "extractStatus",
|
||||
}
|
||||
|
||||
export type AuthResponse =
|
||||
|
Loading…
x
Reference in New Issue
Block a user