dobo 2.38.0 → 2.39.0

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.
@@ -28,7 +28,7 @@ async function memoryAdapterFactory () {
28
28
  async connect (connection, noRebuild) {
29
29
  const conn = this.plugin.getConnection('memory')
30
30
  const { fs } = this.app.lib
31
- const { setInterval } = this.app.lib
31
+ const { startInterval } = this.app.lib
32
32
  const dir = `${this.app.getPluginDataDir(this.plugin.ns)}/memDb/data` // persistence dir
33
33
  fs.ensureDirSync(dir)
34
34
  conn.persistences = conn.persistences ?? []
@@ -52,7 +52,7 @@ async function memoryAdapterFactory () {
52
52
  else this.storage[model.name] = data
53
53
  } else await model.loadFixtures({ ignoreError: false })
54
54
  }
55
- async function handler () {
55
+ const handler = async () => {
56
56
  if (!this.saving) return
57
57
  this.saving = true
58
58
  for (const model of models) {
@@ -64,7 +64,7 @@ async function memoryAdapterFactory () {
64
64
  this.saving = false
65
65
  }
66
66
 
67
- await setInterval(handler, this.plugin.config.memDb.persistenceDur, { lockFile: 'memDbPersistence', scope: this })
67
+ startInterval(handler, this.plugin.config.memDb.persistenceDur, 'memDbPersistence')
68
68
  }
69
69
 
70
70
  async _getOldRecord (model, id, options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "2.38.0",
3
+ "version": "2.39.0",
4
4
  "description": "DBMS for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-08-24
4
+
5
+ - [2.39.0] Now use the new `app.lib.startInterval()`
6
+
3
7
  ## 2026-08-18
4
8
 
5
9
  - [2.38.0] Change `createAggregate()` to `aggregate()`