ag-common 0.0.731 → 0.0.732

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.
@@ -14,7 +14,7 @@ const log_1 = require("../../common/helpers/log");
14
14
  const sleep_1 = require("../../common/helpers/sleep");
15
15
  const withRetry = (operation, operationName, opt) => __awaiter(void 0, void 0, void 0, function* () {
16
16
  let retryCount = 0;
17
- var baseDelay = 2000;
17
+ var baseDelay = 1000;
18
18
  let { maxRetries = 3 } = opt !== null && opt !== void 0 ? opt : {};
19
19
  // eslint-disable-next-line
20
20
  while (true) {
@@ -32,8 +32,8 @@ const withRetry = (operation, operationName, opt) => __awaiter(void 0, void 0, v
32
32
  (0, log_1.warn)(`${operationName}: Max retries exceeded`);
33
33
  throw error;
34
34
  }
35
- const delay = baseDelay * (retryCount * 1000);
36
- (0, log_1.warn)(`${operationName}: Throttled. Retry ${retryCount}`);
35
+ const delay = baseDelay * retryCount;
36
+ (0, log_1.warn)(`${operationName}: Throttled. Retry ${retryCount}. Sleeping for ${delay}ms`);
37
37
  yield (0, sleep_1.sleep)(delay);
38
38
  continue;
39
39
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.731",
2
+ "version": "0.0.732",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",