Skip to content

Commit

Permalink
Different timeouts for blobs vs other reqs
Browse files Browse the repository at this point in the history
Signed-off-by: hfuss <haydenfuss@gmail.com>
  • Loading branch information
onelapahead committed Dec 9, 2021
1 parent b280c0e commit dfd9f40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/handlers/blobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const deliverBlob = async ({ blobPath, recipient, recipientURL, requestID
url: `${recipientURL}/api/v1/blobs${blobPath}`,
data: formData,
headers: formData.getHeaders(),
timeout: utils.constants.REST_API_CALL_BLOB_REQUEST_TIMEOUT,
httpsAgent
});
eventEmitter.emit('event', {
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const constants = {
REST_API_CALL_MAX_ATTEMPTS: 5,
REST_API_CALL_RETRY_DELAY_MS: 500,
REST_API_CALL_REQUEST_TIMEOUT: 5000,
REST_API_CALL_BLOB_REQUEST_TIMEOUT: 60000,
MAX_EVENT_QUEUE_SIZE: 1000,
HASH_HEADER_NAME: 'dx-hash',
LAST_UPDATE_HEADER_NAME: 'dx-last-update'
Expand Down

0 comments on commit dfd9f40

Please sign in to comment.