From e0a939b7ec90651441dcb2fd03c8e39c1086ff76 Mon Sep 17 00:00:00 2001 From: Alperen Elhan Date: Sun, 29 Jan 2023 01:27:31 +0300 Subject: [PATCH] fix: add jobid for bulk operations --- src/server/trpc/router/manga.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/trpc/router/manga.ts b/src/server/trpc/router/manga.ts index e2162ec..2629348 100644 --- a/src/server/trpc/router/manga.ts +++ b/src/server/trpc/router/manga.ts @@ -411,6 +411,9 @@ export const mangaRouter = t.router({ const allMangas = await ctx.prisma.manga.findMany(); await checkOutOfSyncChaptersQueue.addBulk( allMangas.map((m) => ({ + opts: { + jobId: nanoid(), + }, data: { mangaId: m.id }, name: nanoid(), })), @@ -445,6 +448,9 @@ export const mangaRouter = t.router({ const allMangas = await ctx.prisma.manga.findMany(); await fixOutOfSyncChaptersQueue.addBulk( allMangas.map((m) => ({ + opts: { + jobId: nanoid(), + }, data: { mangaId: m.id }, name: nanoid(), })),