This commit is contained in:
NoriDev 2023-09-01 17:22:02 +09:00
parent 4f07235eec
commit 7d8832b368
3 changed files with 4 additions and 3 deletions

View file

@ -65,6 +65,7 @@
- Nodeinfo의 Software 이름을 CherryPick이 아닌 다른 이름으로 변경할 때 관련 주석 추가
- Graceful Shutdown (MisskeyIO/misskey#156)
- perf : 부팅 시 MeiliSearch 설정을 업데이트하지 마십시오 (MisskeyIO/misskey#158)
- Enhance : 종료 시 DB 연결이 끊어지면 확실하게 종료 (MisskeyIO/misskey#159)
- Fix: 실행 중인 앱 내에서 ServerStatsService 시작 (misskey-dev/misskey#11342)
---

View file

@ -119,8 +119,8 @@ export class GlobalModule implements OnApplicationShutdown {
async onApplicationShutdown(signal: string): Promise<void> {
await this.dispose();
process.emitWarning('Misskey is shutting down', {
code: 'MISSKEY_SHUTDOWN',
process.emitWarning('CherryPick is shutting down', {
code: 'CHERRYPICK_SHUTDOWN',
detail: `Application received ${signal} signal`,
});
}

View file

@ -82,7 +82,7 @@ process.on('exit', code => {
});
process.on('warning', warning => {
if ((warning as never)['code'] !== 'MISSKEY_SHUTDOWN') return;
if ((warning as never)['code'] !== 'CHERRYPICK_SHUTDOWN') return;
logger.warn(chalk.yellow(`${warning.message}: ${(warning as never)['detail']}`));
for (const id in cluster.workers) cluster.workers[id]?.process.kill('SIGTERM');
process.exit();