Skip to content

Commit

Permalink
fix: add jobid for bulk operations
Browse files Browse the repository at this point in the history
  • Loading branch information
oae committed Jan 28, 2023
1 parent a4d787d commit e0a939b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/trpc/router/manga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})),
Expand Down Expand Up @@ -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(),
})),
Expand Down

0 comments on commit e0a939b

Please sign in to comment.