mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: add __stopped event
This commit is contained in:
parent
436af4b9f3
commit
bc5caab6f2
@ -305,7 +305,7 @@ export class AppSupervisor extends EventEmitter implements AsyncEmitter {
|
||||
}
|
||||
});
|
||||
|
||||
app.on('afterStop', async () => {
|
||||
app.on('__stopped', async () => {
|
||||
this.setAppStatus(app.name, 'stopped');
|
||||
});
|
||||
|
||||
|
@ -955,6 +955,7 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten
|
||||
}
|
||||
|
||||
await this.emitAsync('afterStop', this, options);
|
||||
this.emit('__stopped', this, options);
|
||||
|
||||
this.stopped = true;
|
||||
log.info(`app has stopped`, { method: 'stop' });
|
||||
|
Loading…
x
Reference in New Issue
Block a user