Skip to content

Commit dfd9f40

Browse files
committed
Different timeouts for blobs vs other reqs
Signed-off-by: hfuss <[email protected]>
1 parent b280c0e commit dfd9f40

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/handlers/blobs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export const deliverBlob = async ({ blobPath, recipient, recipientURL, requestID
9595
url: `${recipientURL}/api/v1/blobs${blobPath}`,
9696
data: formData,
9797
headers: formData.getHeaders(),
98+
timeout: utils.constants.REST_API_CALL_BLOB_REQUEST_TIMEOUT,
9899
httpsAgent
99100
});
100101
eventEmitter.emit('event', {

src/lib/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const constants = {
4040
REST_API_CALL_MAX_ATTEMPTS: 5,
4141
REST_API_CALL_RETRY_DELAY_MS: 500,
4242
REST_API_CALL_REQUEST_TIMEOUT: 5000,
43+
REST_API_CALL_BLOB_REQUEST_TIMEOUT: 60000,
4344
MAX_EVENT_QUEUE_SIZE: 1000,
4445
HASH_HEADER_NAME: 'dx-hash',
4546
LAST_UPDATE_HEADER_NAME: 'dx-last-update'

0 commit comments

Comments
 (0)