@nocobase/database 1.9.0-alpha.15 → 1.9.0-alpha.17

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.
Files changed (2) hide show
  1. package/lib/database.js +4 -3
  2. package/package.json +4 -4
package/lib/database.js CHANGED
@@ -638,8 +638,8 @@ const _Database = class _Database extends import_events.EventEmitter {
638
638
  }
639
639
  /* istanbul ignore next -- @preserve */
640
640
  async auth(options = {}) {
641
- const { retry = 9, ...others } = options;
642
- const startingDelay = 200;
641
+ const { retry = 10, ...others } = options;
642
+ const startingDelay = 1e3;
643
643
  const timeMultiple = 2;
644
644
  let attemptNumber = 1;
645
645
  const authenticate = /* @__PURE__ */ __name(async () => {
@@ -662,7 +662,8 @@ const _Database = class _Database extends import_events.EventEmitter {
662
662
  await (0, import_exponential_backoff.backOff)(authenticate, {
663
663
  numOfAttempts: retry,
664
664
  startingDelay,
665
- timeMultiple
665
+ timeMultiple,
666
+ maxDelay: 30 * 1e3
666
667
  });
667
668
  } catch (error) {
668
669
  throw new Error(`Unable to connect to the database`, { cause: error });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/database",
3
- "version": "1.9.0-alpha.15",
3
+ "version": "1.9.0-alpha.17",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "license": "AGPL-3.0",
8
8
  "dependencies": {
9
- "@nocobase/logger": "1.9.0-alpha.15",
10
- "@nocobase/utils": "1.9.0-alpha.15",
9
+ "@nocobase/logger": "1.9.0-alpha.17",
10
+ "@nocobase/utils": "1.9.0-alpha.17",
11
11
  "async-mutex": "^0.3.2",
12
12
  "chalk": "^4.1.1",
13
13
  "cron-parser": "4.4.0",
@@ -39,5 +39,5 @@
39
39
  "url": "git+https://github.com/nocobase/nocobase.git",
40
40
  "directory": "packages/database"
41
41
  },
42
- "gitHead": "620cda051dd97134add40055d83039e3d9b6891e"
42
+ "gitHead": "2a7be5bd4e1031f1289c38ac4b7d2c07b875e270"
43
43
  }