From 7e9ff2930d7467168a6aba1563cef834b9c33c2b Mon Sep 17 00:00:00 2001 From: Hugo Gresse Date: Tue, 2 Apr 2024 21:28:39 +0200 Subject: [PATCH] Try to run recursiveDelete in parallel --- .../import-speakers-sessions-schedule.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/openplanner/import-speakers-sessions-schedule.ts b/scripts/openplanner/import-speakers-sessions-schedule.ts index 288f1af105..505cb0fa96 100644 --- a/scripts/openplanner/import-speakers-sessions-schedule.ts +++ b/scripts/openplanner/import-speakers-sessions-schedule.ts @@ -161,26 +161,26 @@ const cleanupScheduleSessionSpeakers = async () => { deleteCollection('generatedSessions'), deleteCollection('generatedSpeakers') ]); - // await Promise.all([ - // deleteCollection('schedule'), - // deleteCollection('sessions'), - // deleteCollection('speakers'), - // deleteCollection('partners'), - // deleteCollection('team') - // ]); + await Promise.all([ + deleteCollection('schedule'), + deleteCollection('sessions'), + deleteCollection('speakers'), + deleteCollection('partners'), + deleteCollection('team') + ]); console.log('Cleanup done'); }; getSpeakersSessionsScheduleSponsorFromUrl(url) .then(async (data) => { await cleanupScheduleSessionSpeakers(); - await Promise.all([ - importSessions(data), - importSpeakers(data), - importSchedule(data), - importSponsors(data), - importTeam(data.team) - ]); + // await Promise.all([ + // importSessions(data), + // importSpeakers(data), + // importSchedule(data), + // importSponsors(data), + // importTeam(data.team) + // ]); return data; }) .then(() => {