mirror of
https://github.com/mendableai/firecrawl.git
synced 2025-07-30 20:39:36 +00:00
Nick: fixes
This commit is contained in:
parent
92dbd33e57
commit
8aa07afb6d
@ -245,7 +245,7 @@ export async function scrapeController(req: Request, res: Response) {
|
||||
}
|
||||
if (creditsToBeBilled > 0) {
|
||||
// billing for doc done on queue end, bill only for llm extraction
|
||||
billTeam(team_id, chunk.sub_id, creditsToBeBilled).catch(error => {
|
||||
billTeam(team_id, chunk?.sub_id, creditsToBeBilled).catch(error => {
|
||||
Logger.error(`Failed to bill team ${team_id} for ${creditsToBeBilled} credits: ${error}`);
|
||||
// Optionally, you could notify an admin or add to a retry queue here
|
||||
});
|
||||
|
@ -23,7 +23,7 @@ export async function getLinksFromSitemap(
|
||||
const response = await axios.get(sitemapUrl, { timeout: axiosTimeout });
|
||||
content = response.data;
|
||||
} else if (mode === 'fire-engine') {
|
||||
const response = await scrapWithFireEngine({ url: sitemapUrl, fireEngineOptions: { engine:"tlsclient", disableJsDom: true, mobileProxy: true } });
|
||||
const response = await scrapWithFireEngine({ url: sitemapUrl, fireEngineOptions: { engine:"chrome-cdp" } });
|
||||
content = response.html;
|
||||
}
|
||||
} catch (error) {
|
||||
|
@ -159,7 +159,7 @@ const workerFun = async (
|
||||
}, {
|
||||
...job.opts,
|
||||
jobId: job.id,
|
||||
priority: Math.round((job.opts.priority ?? 10) * 1.25), // exponential backoff for stuck jobs
|
||||
priority: newJobPriority, // exponential backoff for stuck jobs
|
||||
});
|
||||
|
||||
await sleep(gotJobInterval);
|
||||
|
Loading…
x
Reference in New Issue
Block a user