Docker 파일
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
import { initPubnetTables, shouldAutoStartScheduler } from '../utils/db'
|
||||
import { shouldAutoStartScheduler } from '../utils/db'
|
||||
import { pubnetScheduler } from '../utils/pubnet-scheduler'
|
||||
|
||||
export default defineNitroPlugin(async (nitroApp) => {
|
||||
console.log('[Plugin] pubnet-init starting...')
|
||||
|
||||
// DB 테이블 초기화
|
||||
await initPubnetTables()
|
||||
|
||||
// 스케줄러 자동 시작 (환경에 따라)
|
||||
if (shouldAutoStartScheduler()) {
|
||||
pubnetScheduler.start()
|
||||
console.log('[Plugin] pubnet scheduler auto-started (production mode)')
|
||||
} else {
|
||||
console.log('[Plugin] pubnet scheduler NOT started (development mode - use API to start)')
|
||||
console.log('[Plugin] pubnet scheduler NOT started (development mode)')
|
||||
}
|
||||
|
||||
// 서버 종료 시 클린업
|
||||
|
||||
Reference in New Issue
Block a user