Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH Retries ihev2 #2291

Merged
merged 5 commits into from
Jun 18, 2024
Merged

PATCH Retries ihev2 #2291

merged 5 commits into from
Jun 18, 2024

Conversation

jonahkaye
Copy link
Member

@jonahkaye jonahkaye commented Jun 18, 2024

Ticket: #1667

Description

  • increased DR retries to 4 attempts, added ECONNABORTED and ERR_BAD_RESPONSE
  • added 1s sleep in between DR requests when making multiple DRs for a single gateway

Testing

  • Local
    • ran some local requests

Release Plan

  • ⚠️ Points to master
  • Merge this

@jonahkaye jonahkaye changed the base branch from develop to master June 18, 2024 20:54
@@ -137,13 +137,21 @@ export async function sendSignedXmlMtom({
},
httpsAgent: agent,
responseType: "arraybuffer",
maxBodyLength: Infinity,
maxContentLength: Infinity,
Copy link
Member Author

@jonahkaye jonahkaye Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxContentLength size of -1 exceeded
^ we have had this error in prod 3 times

We added retries for ERR_BAD_RESPONSE, and this change was also recommended in this issue

axios/axios#1362

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was missing these from previous PR

@@ -111,6 +112,7 @@ export class IHEGatewayV2Async extends IHEGatewayV2 {
for (const chunk of requestChunks) {
const params = { patientId, cxId, requestId, drRequestsGatewayV2: chunk };

await sleep(1000);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delay between DR request attempts. This is within a single gateway.

@jonahkaye jonahkaye self-assigned this Jun 18, 2024
@jonahkaye jonahkaye changed the title 1667 fix retries ihev2 PATCH Retries ihev2 Jun 18, 2024
@jonahkaye jonahkaye marked this pull request as ready for review June 18, 2024 21:04
Refs: #1667
Signed-off-by: Jonah Kaye <[email protected]>
Copy link
Member

@Goncharo Goncharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jonahkaye jonahkaye added this pull request to the merge queue Jun 18, 2024
Comment on lines 17 to 19
const SLEEP_IN_BETWEEN_DOCUMENT_RETRIEVAL_REQUESTS = dayjs
.duration({ seconds: 1 })
.asMilliseconds();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its better to create the const as duration and convert to the unit needed on the place where we use it

@jonahkaye jonahkaye removed this pull request from the merge queue due to a manual request Jun 18, 2024
@jonahkaye jonahkaye added this pull request to the merge queue Jun 18, 2024
Merged via the queue into master with commit eb7e7c6 Jun 18, 2024
11 checks passed
@jonahkaye jonahkaye deleted the 1667-fix-retries-ihev2 branch June 18, 2024 22:17
@jonahkaye jonahkaye mentioned this pull request Jun 19, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants