Comparing version 4.6.0 to 4.6.1
# CHANGELOG | ||
## v4.6.1 - 2023-12-15 | ||
### Changes | ||
* :recycle: tweak async delays & retry | ||
* :recycle: tweak default async sample delays & retry | ||
* :memo: update md doc & fix typos | ||
## v4.6.0 - 2023-12-11 | ||
@@ -4,0 +11,0 @@ ### Changes |
{ | ||
"name": "mindee", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"description": "Mindee Client Library for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -231,5 +231,5 @@ "use strict"; | ||
cropper: predictParams.cropper, | ||
initialDelaySec: 6, | ||
delaySec: 3, | ||
maxRetries: 10, | ||
initialDelaySec: 4, | ||
delaySec: 2, | ||
maxRetries: 30, | ||
}); | ||
@@ -242,5 +242,5 @@ } | ||
cropper: predictParams.cropper, | ||
initialDelaySec: 6, | ||
delaySec: 3, | ||
maxRetries: 10, | ||
initialDelaySec: 4, | ||
delaySec: 2, | ||
maxRetries: 30, | ||
}); | ||
@@ -247,0 +247,0 @@ if (!response.document) { |
@@ -156,5 +156,5 @@ "use strict"; | ||
pageOptions: undefined, | ||
initialDelaySec: 6, | ||
delaySec: 3, | ||
maxRetries: 10, | ||
initialDelaySec: 4, | ||
delaySec: 2, | ||
maxRetries: 30, | ||
initialTimerOptions: undefined, | ||
@@ -287,13 +287,16 @@ recurringTimerOptions: undefined, | ||
_Client_instances = new WeakSet(), _Client_validateAsyncParams = function _Client_validateAsyncParams(asyncParams) { | ||
asyncParams.delaySec ?? (asyncParams.delaySec = 3); | ||
asyncParams.initialDelaySec ?? (asyncParams.initialDelaySec = 6); | ||
asyncParams.maxRetries ?? (asyncParams.maxRetries = 10); | ||
if (asyncParams.delaySec < 2) { | ||
throw Error("Cannot set auto-parsing delay to less than 2 seconds."); | ||
const minDelaySec = 1; | ||
const minInitialDelay = 2; | ||
const minRetries = 2; | ||
asyncParams.delaySec ?? (asyncParams.delaySec = 2); | ||
asyncParams.initialDelaySec ?? (asyncParams.initialDelaySec = 4); | ||
asyncParams.maxRetries ?? (asyncParams.maxRetries = 30); | ||
if (asyncParams.delaySec < minDelaySec) { | ||
throw Error(`Cannot set auto-parsing delay to less than ${minDelaySec} seconds.`); | ||
} | ||
if (asyncParams.initialDelaySec < 4) { | ||
throw Error("Cannot set initial parsing delay to less than 4 seconds."); | ||
if (asyncParams.initialDelaySec < minInitialDelay) { | ||
throw Error(`Cannot set initial parsing delay to less than ${minInitialDelay} seconds.`); | ||
} | ||
if (!Number.isInteger(asyncParams.maxRetries)) { | ||
throw Error("Retry amount must be an integer."); | ||
if (asyncParams.maxRetries < minRetries) { | ||
throw Error(`Cannot set retry to less than ${minRetries}.`); | ||
} | ||
@@ -300,0 +303,0 @@ }, _Client_buildProductEndpoint = function _Client_buildProductEndpoint(endpointName, accountName, endpointVersion) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
405049
9439