From 7d8832b3687cccf64a245ff1dbaa8866469b62ac Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 1 Sep 2023 17:22:02 +0900 Subject: [PATCH] tweak 4f07235e --- CHANGELOG_CHERRYPICK.md | 1 + packages/backend/src/GlobalModule.ts | 4 ++-- packages/backend/src/boot/index.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index fc2d77c9c5..71364e1c1f 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -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) --- diff --git a/packages/backend/src/GlobalModule.ts b/packages/backend/src/GlobalModule.ts index 7e4187e437..9498a55211 100644 --- a/packages/backend/src/GlobalModule.ts +++ b/packages/backend/src/GlobalModule.ts @@ -119,8 +119,8 @@ export class GlobalModule implements OnApplicationShutdown { async onApplicationShutdown(signal: string): Promise { 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`, }); } diff --git a/packages/backend/src/boot/index.ts b/packages/backend/src/boot/index.ts index fc8eaccdea..caea39b9b6 100644 --- a/packages/backend/src/boot/index.ts +++ b/packages/backend/src/boot/index.ts @@ -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();