mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 19:58:08 +08:00
fix: always complete job, no try
This commit is contained in:
parent
191dfbd9ca
commit
a1c2ee5aa9
|
@ -52,11 +52,7 @@ const processJobInternal = async (token: string, job: Job) => {
|
|||
const result = await processJob(job, token);
|
||||
const jobState = await job.getState();
|
||||
if (jobState !== "completed" && jobState !== "failed") {
|
||||
try{
|
||||
await job.moveToCompleted(result.docs, token, false); //3rd arg fetchNext
|
||||
}catch(e){
|
||||
// console.log("Job already completed, error:", e);
|
||||
}
|
||||
await job.moveToCompleted(result.docs, token, false);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("Job failed, error:", error);
|
||||
|
|
Loading…
Reference in New Issue
Block a user