forked from FoundKeyGang/FoundKey
backend: Fix async types in boot
This commit is contained in:
parent
d1f3353771
commit
13ce1f0d4e
3 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ const ev = new Xev();
|
|||
/**
|
||||
* Init process
|
||||
*/
|
||||
export default async function(): void {
|
||||
export default async function(): Promise<void> {
|
||||
process.title = `Misskey (${cluster.isPrimary ? 'master' : 'worker'})`;
|
||||
|
||||
if (cluster.isPrimary || envOption.disableClustering) {
|
||||
|
|
|
@ -49,7 +49,7 @@ function greet(): void {
|
|||
/**
|
||||
* Init master process
|
||||
*/
|
||||
export async function masterMain(): void {
|
||||
export async function masterMain(): Promise<void> {
|
||||
let config!: Config;
|
||||
|
||||
// initialize app
|
||||
|
@ -141,7 +141,7 @@ async function connectDb(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
async function spawnWorkers(limit = 1): void {
|
||||
async function spawnWorkers(limit = 1): Promise<void> {
|
||||
const workers = Math.min(limit, os.cpus().length);
|
||||
bootLogger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`);
|
||||
await Promise.all([...Array(workers)].map(spawnWorker));
|
||||
|
|
|
@ -4,7 +4,7 @@ import { initDb } from '@/db/postgre.js';
|
|||
/**
|
||||
* Init worker process
|
||||
*/
|
||||
export async function workerMain() {
|
||||
export async function workerMain(): Promise<void> {
|
||||
await initDb();
|
||||
|
||||
// start server
|
||||
|
|
Loading…
Reference in a new issue