Skip to content

Commit

Permalink
fix(ihev2): only sleep on follow up dr requests
Browse files Browse the repository at this point in the history
Refs: #1667
Signed-off-by: Jonah Kaye <[email protected]>
  • Loading branch information
jonahkaye committed Jun 18, 2024
1 parent 82e386d commit e45834d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ export class IHEGatewayV2Async extends IHEGatewayV2 {
MAX_DOCUMENT_RETRIEVAL_REQUESTS_PER_INVOCATION
);

for (const chunk of requestChunks) {
for (let i = 0; i < requestChunks.length; i++) {
const chunk = requestChunks[i];
const params = { patientId, cxId, requestId, drRequestsGatewayV2: chunk };

await sleep(1000);
if (i > 0) {
await sleep(1000);
}

// intentionally not waiting
lambdaClient
.invoke({
Expand Down

0 comments on commit e45834d

Please sign in to comment.