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

Back Merge #2293

Merged
merged 9 commits into from
Jun 19, 2024
Prev Previous commit
Next Next commit
fix(ihev2): constants
Refs: #1667
Signed-off-by: Jonah Kaye <[email protected]>
  • Loading branch information
jonahkaye committed Jun 18, 2024
commit 335b7d5d1e53ea718b1c0b32ad0d39d213d47209
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Config } from "../../../util/config";
import { processAsyncError } from "../../../util/error/shared";
import { IHEGatewayV2 } from "./ihe-gateway-v2";

const SLEEP_IN_BETWEEN_DOCUMENT_RETRIEVAL_REQUESTS = 1000;
const MAX_GATEWAYS_BEFORE_CHUNK = 1000;
const MAX_DOCUMENT_QUERY_REQUESTS_PER_INVOCATION = 20;
const MAX_DOCUMENT_RETRIEVAL_REQUESTS_PER_INVOCATION = 20;
Expand Down Expand Up @@ -114,7 +115,7 @@ export class IHEGatewayV2Async extends IHEGatewayV2 {
const params = { patientId, cxId, requestId, drRequestsGatewayV2: chunk };

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

// intentionally not waiting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {

const { log } = out("Saml Client");
const timeout = 120000;
const maxPayloadSize = Infinity;
let rejectUnauthorized = true;
let trustedStore: string | undefined = undefined;
async function getTrustedKeyStore(): Promise<string> {
Expand Down Expand Up @@ -84,7 +85,7 @@ export async function sendSignedXml({
const response = await executeWithNetworkRetries(
async () => {
return axios.post(url, signedXml, {
timeout: 120000,
timeout: timeout,
headers: {
"Content-Type": "application/soap+xml;charset=UTF-8",
Accept: "application/soap+xml",
Expand Down Expand Up @@ -137,8 +138,8 @@ export async function sendSignedXmlMtom({
},
httpsAgent: agent,
responseType: "arraybuffer",
maxBodyLength: Infinity,
maxContentLength: Infinity,
maxBodyLength: maxPayloadSize,
maxContentLength: maxPayloadSize,
});
},
{
Expand Down
Loading