시스템 모니터
This commit is contained in:
20
backend/plugins/pubnet-init.ts
Normal file
20
backend/plugins/pubnet-init.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { initPubnetTables } from '../utils/db'
|
||||
import { pubnetScheduler } from '../utils/pubnet-scheduler'
|
||||
|
||||
export default defineNitroPlugin((nitroApp) => {
|
||||
console.log('[Plugin] pubnet-init starting...')
|
||||
|
||||
// DB 테이블 초기화
|
||||
initPubnetTables()
|
||||
|
||||
// 스케줄러 자동 시작
|
||||
pubnetScheduler.start()
|
||||
|
||||
// 서버 종료 시 클린업
|
||||
nitroApp.hooks.hook('close', () => {
|
||||
console.log('[Plugin] Shutting down pubnet scheduler...')
|
||||
pubnetScheduler.stop()
|
||||
})
|
||||
|
||||
console.log('[Plugin] pubnet-init completed')
|
||||
})
|
||||
Reference in New Issue
Block a user