mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: ensure old instances are cleaned up during application reinitialization (#6524)
* fix: getConnection called after connection closed error * fix: ensure old instances are cleaned up during application reinitialization
This commit is contained in:
parent
f7a81858ea
commit
369754f8f0
@ -572,6 +572,10 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten
|
|||||||
|
|
||||||
this.log.info('app reinitializing');
|
this.log.info('app reinitializing');
|
||||||
|
|
||||||
|
// trigger the stop events to make sure old instances are cleaned up
|
||||||
|
await this.emitAsync('beforeStop');
|
||||||
|
await this.emitAsync('afterStop');
|
||||||
|
|
||||||
if (this.cacheManager) {
|
if (this.cacheManager) {
|
||||||
await this.cacheManager.close();
|
await this.cacheManager.close();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user