mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 16:05:58 +08:00
feat(search): only for low tier users for good DX
This commit is contained in:
parent
95d1cd2f78
commit
96f75f898f
@ -76,6 +76,7 @@ async function scrapeSearchResult(
|
|||||||
logger: Logger,
|
logger: Logger,
|
||||||
costTracking: CostTracking,
|
costTracking: CostTracking,
|
||||||
flags: TeamFlags,
|
flags: TeamFlags,
|
||||||
|
directToBullMQ: boolean = false,
|
||||||
): Promise<Document> {
|
): Promise<Document> {
|
||||||
const jobId = uuidv4();
|
const jobId = uuidv4();
|
||||||
const jobPriority = await getJobPriority({
|
const jobPriority = await getJobPriority({
|
||||||
@ -106,7 +107,7 @@ async function scrapeSearchResult(
|
|||||||
{},
|
{},
|
||||||
jobId,
|
jobId,
|
||||||
jobPriority,
|
jobPriority,
|
||||||
true,
|
directToBullMQ,
|
||||||
);
|
);
|
||||||
|
|
||||||
const doc: Document = await waitForJob(jobId, options.timeout);
|
const doc: Document = await waitForJob(jobId, options.timeout);
|
||||||
@ -229,7 +230,7 @@ export async function searchController(
|
|||||||
origin: req.body.origin,
|
origin: req.body.origin,
|
||||||
timeout: req.body.timeout,
|
timeout: req.body.timeout,
|
||||||
scrapeOptions: req.body.scrapeOptions,
|
scrapeOptions: req.body.scrapeOptions,
|
||||||
}, logger, costTracking, req.acuc?.flags ?? null),
|
}, logger, costTracking, req.acuc?.flags ?? null, (req.acuc?.price_credits ?? 0) <= 3000),
|
||||||
);
|
);
|
||||||
|
|
||||||
const docs = await Promise.all(scrapePromises);
|
const docs = await Promise.all(scrapePromises);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user