fix: build

This commit is contained in:
Neko Ayaka
2025-03-21 02:43:35 +08:00
parent f3b93ab465
commit 900f72267b
5 changed files with 9 additions and 10 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel } from '@guiiai/logg'
import { Client } from '@proj-airi/server-sdk'
import { runUntilSignal } from './utils/process'
import { runUntilSignal } from '@proj-airi/server-sdk/utils/node'
setGlobalFormat(Format.Pretty)
setGlobalLogLevel(LogLevel.Log)
@@ -1,30 +0,0 @@
import process from 'node:process'
import { useLogg } from '@guiiai/logg'
const logger = useLogg('process').useGlobalConfig()
let running = true
function killProcess() {
running = false
}
process.on('SIGTERM', () => {
logger.log('SIGTERM received')
killProcess()
})
process.on('SIGINT', () => {
logger.log('SIGINT received')
killProcess()
})
process.on('uncaughtException', (e) => {
logger.withError(e).error('uncaught exception')
killProcess()
})
export function runUntilSignal() {
setTimeout(() => {
if (running)
runUntilSignal()
}, 10)
}