Skip to content

Commit

Permalink
9970 - parallelize requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Rogers committed Jul 6, 2023
1 parent 10ff442 commit b864685
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const serveThirtyDayNoticeInteractor = async (

let pdfsAppended: number = 0;
let hasPaperService = false;
for (const aCase of trialSession.caseOrder!) {
const lotsOPromises = trialSession.caseOrder.map(async aCase => {
const rawCase = await applicationContext
.getPersistenceGateway()
.getCaseByDocketNumber({
Expand Down Expand Up @@ -185,7 +185,9 @@ export const serveThirtyDayNoticeInteractor = async (
userId: currentUser.userId,
});
}
}
});

await Promise.all(lotsOPromises);

let pdfUrl: string | undefined = undefined;
if (hasPaperService) {
Expand Down

0 comments on commit b864685

Please sign in to comment.