From 7c8881f1a899db8a47afbec8d53ed798c2362476 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 24 Oct 2023 18:28:57 +0200 Subject: [PATCH] [backend] Limit user profile mentions queue to a concurrency of 5 --- packages/backend/src/models/repositories/user-profile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/models/repositories/user-profile.ts b/packages/backend/src/models/repositories/user-profile.ts index 9579a68a0..2b8c9fd93 100644 --- a/packages/backend/src/models/repositories/user-profile.ts +++ b/packages/backend/src/models/repositories/user-profile.ts @@ -8,7 +8,7 @@ import { unique } from "@/prelude/array.js"; import config from "@/config/index.js"; import { Semaphore } from "async-mutex"; -const queue = new Semaphore(10); +const queue = new Semaphore(5); export const UserProfileRepository = db.getRepository(UserProfile).extend({ // We must never await this without promiseEarlyReturn, otherwise giant webring-style profile mention trees will cause the queue to stop working