로컬(개발)용과 운영용 설정분리
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import { shouldAutoStartScheduler } from '../utils/db'
|
||||
import { startServerScheduler } from '../utils/server-scheduler'
|
||||
|
||||
export default defineNitroPlugin(() => {
|
||||
// 서버 시작 시 스케줄러 자동 시작
|
||||
startServerScheduler()
|
||||
|
||||
console.log('[Server] Plugin initialized - scheduler auto-started')
|
||||
// 스케줄러 자동 시작 (환경에 따라)
|
||||
if (shouldAutoStartScheduler()) {
|
||||
startServerScheduler()
|
||||
console.log('[Server] Plugin initialized - scheduler auto-started (production mode)')
|
||||
} else {
|
||||
console.log('[Server] Plugin initialized - scheduler NOT started (development mode - use API to start)')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user