diff --git a/server/source/jobs/weekly-randomizer.ts b/server/source/jobs/weekly-randomizer.ts index 842f2d670..1723e7f7c 100644 --- a/server/source/jobs/weekly-randomizer.ts +++ b/server/source/jobs/weekly-randomizer.ts @@ -42,6 +42,10 @@ const standupMembers = await Promise.all( ) ) +while (standupMembers.length > 0 && standupMembers.length < 4) { + standupMembers.push(...standupMembers) +} + const shuffleMembers = shuffleArray(standupMembers) await mongo.setWeeklyTeamOrder(shuffleMembers.map(({ id }) => id))