feat(utils): Introduce promiseAll util (#5543)

This commit is contained in:
Adrien de Peretti
2023-11-08 08:48:48 +01:00
committed by GitHub
parent e4ce2f4e07
commit f90ba02087
99 changed files with 464 additions and 297 deletions
@@ -12,6 +12,7 @@ import {
} from "./types"
import { EventEmitter } from "events"
import { promiseAll } from "@medusajs/utils"
export type TransactionFlow = {
modelId: string
@@ -404,7 +405,7 @@ export class TransactionOrchestrator extends EventEmitter {
}
}
await Promise.all(execution)
await promiseAll(execution)
if (nextSteps.next.length > 0) {
await this.executeNext(transaction)