From 0da95e9ba441a5228b397bb1b868f056dd46199a Mon Sep 17 00:00:00 2001 From: Aidan Jones Date: Thu, 31 Oct 2024 10:09:58 -0400 Subject: [PATCH] await adding job to queue for project --- .../projects/import/[id=idNumber]/+page.server.ts | 2 +- .../(authenticated)/projects/new/[id=idNumber]/+page.server.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/import/[id=idNumber]/+page.server.ts b/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/import/[id=idNumber]/+page.server.ts index f248691f4..746d4a723 100644 --- a/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/import/[id=idNumber]/+page.server.ts +++ b/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/import/[id=idNumber]/+page.server.ts @@ -188,7 +188,7 @@ export const actions: Actions = { if (projects) { // Create products - queues.scriptoria.addBulk( + await queues.scriptoria.addBulk( projects.map((p) => ({ name: `Create Project #${p}`, data: { diff --git a/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/new/[id=idNumber]/+page.server.ts b/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/new/[id=idNumber]/+page.server.ts index 5f9dff625..3f0c79e4f 100644 --- a/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/new/[id=idNumber]/+page.server.ts +++ b/source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/new/[id=idNumber]/+page.server.ts @@ -75,7 +75,7 @@ export const actions: Actions = { }); if (project !== false) { - queues.scriptoria.add(`Create Project #${project}`, { + await queues.scriptoria.add(`Create Project #${project}`, { type: BullMQ.ScriptoriaJobType.Project_Create, projectId: project as number },