From 0d18e34c24a5fa58b67a8a8148af11e33b0a5742 Mon Sep 17 00:00:00 2001 From: Bruce Berrios Date: Mon, 9 Sep 2024 23:07:57 -0400 Subject: fixes --- backend/src/jobs/delete-users.ts | 4 +--- backend/src/utils/misc.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/jobs/delete-users.ts b/backend/src/jobs/delete-users.ts index 2d8e57b47..f9f9121da 100644 --- a/backend/src/jobs/delete-users.ts +++ b/backend/src/jobs/delete-users.ts @@ -59,9 +59,7 @@ async function deleteUsers(): Promise { return; } - await mapLimit(softDeletedUsers, CONCURRENT_DELETIONS, async (user) => { - await deleteUser(user.uid); - }); + await mapLimit(softDeletedUsers, CONCURRENT_DELETIONS, async (user) => deleteUser(user.uid)); } export default new CronJob(CRON_SCHEDULE, deleteUsers); diff --git a/backend/src/utils/misc.ts b/backend/src/utils/misc.ts index a5ee6e1dd..1057a15d3 100644 --- a/backend/src/utils/misc.ts +++ b/backend/src/utils/misc.ts @@ -344,7 +344,7 @@ export function replaceObjectIds( return data.map((it) => replaceObjectId(it)); } -type MapLimitIteratee = (element: T, index: number) => V; +type MapLimitIteratee = (element: T, index: number) => Promise; export async function mapLimit( input: T[], -- cgit v1.2.3