feat(backend): add /healthz endpoint (#13834)
* feat(backend): add /healthz endpoint * feat(backend): also check meilisearch status if available * style: header * chore: no-store * chore: healthcheck.sh * style: format
This commit is contained in:
@@ -15,6 +15,7 @@ import Logger from '@/logger.js';
|
||||
import { envOption } from '../env.js';
|
||||
import { masterMain } from './master.js';
|
||||
import { workerMain } from './worker.js';
|
||||
import { readyRef } from './ready.js';
|
||||
|
||||
import 'reflect-metadata';
|
||||
|
||||
@@ -79,6 +80,8 @@ if (cluster.isWorker || envOption.disableClustering) {
|
||||
await workerMain();
|
||||
}
|
||||
|
||||
readyRef.value = true;
|
||||
|
||||
// ユニットテスト時にMisskeyが子プロセスで起動された時のため
|
||||
// それ以外のときは process.send は使えないので弾く
|
||||
if (process.send) {
|
||||
|
6
packages/backend/src/boot/ready.ts
Normal file
6
packages/backend/src/boot/ready.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export const readyRef = { value: false };
|
Reference in New Issue
Block a user