@iobroker/db-base 4.0.6-alpha.0-20220209-3a6580b2 → 4.0.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.
@@ -178,6 +178,15 @@ class InMemoryFileDB {
178
178
  if (isNaN(this.settings.backup.period)) {
179
179
  this.settings.backup.period = 120;
180
180
  }
181
+ // Node.js timeouts overflow after roughly 24 days, defaulting to 1 millisecond, which causes chaos.
182
+ // If a user configured the backup this way, we use our default of 120 minutes instead.
183
+ const maxTimeoutMinutes = Math.floor((2 ** 31 - 1) / 60000);
184
+ if (this.settings.backup.period > maxTimeoutMinutes) {
185
+ this.settings.backup.period = 120;
186
+ this.log.warning(
187
+ `${this.namespace} Configured backup period ${this.settings.backup.period} is larger than the supported maximum of ${maxTimeoutMinutes} minutes. Defaulting to 120 minutes.`
188
+ );
189
+ }
181
190
  this.settings.backup.period *= 60000;
182
191
 
183
192
  this.settings.backup.files =
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@iobroker/db-base",
3
- "version": "4.0.6-alpha.0-20220209-3a6580b2",
3
+ "version": "4.0.8",
4
4
  "engines": {
5
5
  "node": ">=12.0.0"
6
6
  },
7
7
  "dependencies": {
8
- "@iobroker/js-controller-common": "4.0.6-alpha.0-20220209-3a6580b2",
8
+ "@iobroker/js-controller-common": "4.0.8",
9
9
  "deep-clone": "^3.0.3",
10
10
  "fs-extra": "^10.0.0",
11
11
  "respjs": "^4.2.0"
@@ -35,5 +35,5 @@
35
35
  "lib/",
36
36
  "index.js"
37
37
  ],
38
- "gitHead": "ce7aaf729286e88c7a82bca5d9b29c9581d308ba"
38
+ "gitHead": "8b7b22a25e89917d86efc3cc89fd5dc78903dcd1"
39
39
  }