diff --git a/api/users/:uuid/inbox/index.ts b/api/users/:uuid/inbox/index.ts index f8b6c6b2..6d9091ac 100644 --- a/api/users/:uuid/inbox/index.ts +++ b/api/users/:uuid/inbox/index.ts @@ -123,9 +123,9 @@ export default apiRoute((app) => } }); - inboxWorker.on("failed", (job) => { + inboxWorker.on("failed", (job, error) => { if (job && job.id === result.id) { - reject(job.returnvalue); + reject(error); } }); }); diff --git a/worker.ts b/worker.ts index 9d653740..fc31d0ec 100644 --- a/worker.ts +++ b/worker.ts @@ -204,5 +204,5 @@ export const inboxWorker = new Worker( } } }, - { connection }, + { connection, removeOnComplete: { count: 0 } }, );