1
0
mirror of synced 2026-03-24 03:38:34 +08:00

feat(data-source): timing改成串行

This commit is contained in:
roymondchen
2023-09-19 19:41:53 +08:00
parent 1c6c9ab3e8
commit 28b3d2e4b3
2 changed files with 12 additions and 8 deletions

View File

@@ -94,11 +94,15 @@ class DataSourceManager extends EventEmitter {
}
});
await Promise.all(beforeInit.map((method) => method({ params: {}, dataSource: ds, app: this.app })));
for (const method of beforeInit) {
await method({ params: {}, dataSource: ds, app: this.app });
}
await ds.init();
await Promise.all(afterInit.map((method) => method({ params: {}, dataSource: ds, app: this.app })));
for (const method of afterInit) {
await method({ params: {}, dataSource: ds, app: this.app });
}
this.setData(ds);