mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 02:09:03 +08:00
Merge branch 'v1-webscraper' of https://github.com/mendableai/firecrawl into v1-webscraper
This commit is contained in:
commit
e5b807ccc4
@ -53,8 +53,10 @@ export async function crawlStatusController(req: RequestWithAuth<CrawlStatusPara
|
||||
used++;
|
||||
}
|
||||
|
||||
if (used < doneJobsOrder.length) {
|
||||
doneJobs.splice(doneJobs.length - 1, 1);
|
||||
used--;
|
||||
}
|
||||
} else {
|
||||
doneJobs = (await Promise.all(doneJobsOrder.map(async x => await getJob(x))));
|
||||
}
|
||||
|
@ -28,8 +28,9 @@ export async function getCrawl(id: string): Promise<StoredCrawl | null> {
|
||||
|
||||
export async function getCrawlExpiry(id: string): Promise<Date> {
|
||||
const d = new Date();
|
||||
const ttl = await redisConnection.ttl(id);
|
||||
d.setSeconds(d.getSeconds() + ttl);
|
||||
const ttl = await redisConnection.pttl("crawl:" + id);
|
||||
d.setMilliseconds(d.getMilliseconds() + ttl);
|
||||
d.setMilliseconds(0);
|
||||
return d;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user