Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix: always complete job, no try

Gergo Moricza1c2ee5aa949
diff --git a/apps/api/src/services/queue-worker.ts b/apps/api/src/services/queue-worker.ts
index 49137d39a..eab797463 100644
--- a/apps/api/src/services/queue-worker.ts
+++ b/apps/api/src/services/queue-worker.ts
@@ -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);