@nocobase/database 1.9.0-beta.7 → 1.9.0-beta.8
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/lib/database.js +4 -3
- package/package.json +4 -4
package/lib/database.js
CHANGED
|
@@ -611,8 +611,8 @@ const _Database = class _Database extends import_events.EventEmitter {
|
|
|
611
611
|
}
|
|
612
612
|
/* istanbul ignore next -- @preserve */
|
|
613
613
|
async auth(options = {}) {
|
|
614
|
-
const { retry =
|
|
615
|
-
const startingDelay =
|
|
614
|
+
const { retry = 10, ...others } = options;
|
|
615
|
+
const startingDelay = 1e3;
|
|
616
616
|
const timeMultiple = 2;
|
|
617
617
|
let attemptNumber = 1;
|
|
618
618
|
const authenticate = /* @__PURE__ */ __name(async () => {
|
|
@@ -635,7 +635,8 @@ const _Database = class _Database extends import_events.EventEmitter {
|
|
|
635
635
|
await (0, import_exponential_backoff.backOff)(authenticate, {
|
|
636
636
|
numOfAttempts: retry,
|
|
637
637
|
startingDelay,
|
|
638
|
-
timeMultiple
|
|
638
|
+
timeMultiple,
|
|
639
|
+
maxDelay: 30 * 1e3
|
|
639
640
|
});
|
|
640
641
|
} catch (error) {
|
|
641
642
|
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-beta.
|
|
3
|
+
"version": "1.9.0-beta.8",
|
|
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-beta.
|
|
10
|
-
"@nocobase/utils": "1.9.0-beta.
|
|
9
|
+
"@nocobase/logger": "1.9.0-beta.8",
|
|
10
|
+
"@nocobase/utils": "1.9.0-beta.8",
|
|
11
11
|
"async-mutex": "^0.3.2",
|
|
12
12
|
"chalk": "^4.1.1",
|
|
13
13
|
"cron-parser": "4.4.0",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
39
39
|
"directory": "packages/database"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f3d4f3d1ba7adbf4d4c60e656c23da45565769c8"
|
|
42
42
|
}
|