From 36d88cd3d49d1e5138375cd364419575733ab7b3 Mon Sep 17 00:00:00 2001 From: Stanislas Polu Date: Sat, 18 May 2024 08:38:32 +0200 Subject: [PATCH] Bump scrub workspace parallelism (#5126) --- front/temporal/scrub_workspace/activities.ts | 3 +-- front/temporal/scrub_workspace/worker.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/front/temporal/scrub_workspace/activities.ts b/front/temporal/scrub_workspace/activities.ts index e7e207a16279..9d507b45f773 100644 --- a/front/temporal/scrub_workspace/activities.ts +++ b/front/temporal/scrub_workspace/activities.ts @@ -98,8 +98,7 @@ async function deleteAllConversations(auth: Authenticator) { "Deleting all conversations for workspace." ); - // Temporary until we ease the load on the DB. - const conversationChunks = chunk(conversations, 1); + const conversationChunks = chunk(conversations, 4); for (const conversationChunk of conversationChunks) { await Promise.all( conversationChunk.map(async (c) => { diff --git a/front/temporal/scrub_workspace/worker.ts b/front/temporal/scrub_workspace/worker.ts index 24878f39febb..bad6e18c30c8 100644 --- a/front/temporal/scrub_workspace/worker.ts +++ b/front/temporal/scrub_workspace/worker.ts @@ -13,7 +13,7 @@ export async function runScrubWorkspaceQueueWorker() { const worker = await Worker.create({ workflowsPath: require.resolve("./workflows"), activities, - maxConcurrentActivityTaskExecutions: 1, + maxConcurrentActivityTaskExecutions: 2, taskQueue: QUEUE_NAME, connection, namespace,