mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix: app's afterLoad event wasn't triggered after installation (#5506)
* fix: hooks true * fix: error
This commit is contained in:
parent
eb6dc302ea
commit
3407c89ee6
@ -566,6 +566,10 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten
|
||||
}
|
||||
}
|
||||
|
||||
if (this.cacheManager) {
|
||||
await this.cacheManager.close();
|
||||
}
|
||||
|
||||
this._cacheManager = await createCacheManager(this, this.options.cacheManager);
|
||||
|
||||
this.log.debug('init plugins');
|
||||
@ -582,11 +586,13 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten
|
||||
|
||||
// Telemetry is initialized after beforeLoad hook
|
||||
// since some configuration may be registered in beforeLoad hook
|
||||
if (!this.telemetry.started) {
|
||||
this.telemetry.init();
|
||||
if (this.options.telemetry?.enabled) {
|
||||
// Start collecting telemetry data if enabled
|
||||
this.telemetry.start();
|
||||
}
|
||||
}
|
||||
|
||||
await this.pm.load(options);
|
||||
|
||||
@ -915,7 +921,7 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten
|
||||
await this.reInit();
|
||||
await this.db.sync();
|
||||
await this.load({ hooks: false });
|
||||
|
||||
this._loaded = false;
|
||||
this.log.debug('emit beforeInstall', { method: 'install' });
|
||||
this.setMaintainingMessage('call beforeInstall hook...');
|
||||
await this.emitAsync('beforeInstall', this, options);
|
||||
|
Loading…
x
Reference in New Issue
Block a user