gd-sprest 9.8.1 → 9.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/rest.js +1 -1
- package/build/utils/request.js +3 -3
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
package/build/rest.js
CHANGED
package/build/utils/request.js
CHANGED
|
@@ -712,9 +712,9 @@ export const Request = {
|
|
|
712
712
|
targetInfo.url = data["@odata.nextLink"] || data.d.__next;
|
|
713
713
|
// Set the sleep value to prevent throttling
|
|
714
714
|
let sleepInMS = 0;
|
|
715
|
-
if (xhr.rateLimit
|
|
716
|
-
// Set the
|
|
717
|
-
sleepInMS = xhr.rateLimit.reset *
|
|
715
|
+
if (xhr.rateLimit) {
|
|
716
|
+
// Set the sleep time to be twice the amount of suggested
|
|
717
|
+
sleepInMS = xhr.rateLimit.reset * 2000;
|
|
718
718
|
// Log
|
|
719
719
|
console.info("[gd-sprest] Throttle approaching... Waiting " + sleepInMS + "ms before sending the next request.", xhr.rateLimit);
|
|
720
720
|
}
|