feat: 배치 관리 시스템 테스트 및 업데이트 기능 개선

- 배치 스케줄러 서비스 안정성 향상
- 외부 DB 연결 서비스 개선
- 배치 컨트롤러 및 관리 컨트롤러 업데이트
- 프론트엔드 배치 관리 페이지 개선
- Prisma 스키마 업데이트
This commit is contained in:
2025-09-29 13:48:59 +09:00
parent 2448f26bc3
commit 9680991962
10 changed files with 315 additions and 29 deletions

View File

@@ -3,6 +3,7 @@
import { Request, Response } from "express";
import { BatchService } from "../services/batchService";
import { BatchSchedulerService } from "../services/batchSchedulerService";
import { BatchConfigFilter, CreateBatchConfigRequest, UpdateBatchConfigRequest } from "../types/batchTypes";
export interface AuthenticatedRequest extends Request {
@@ -190,6 +191,11 @@ export class BatchController {
cronSchedule,
mappings
} as CreateBatchConfigRequest);
// 생성된 배치가 활성화 상태라면 스케줄러에 등록
if (batchConfig.data && batchConfig.data.is_active === 'Y' && batchConfig.data.id) {
await BatchSchedulerService.updateBatchSchedule(batchConfig.data.id);
}
return res.status(201).json({
success: true,
@@ -235,6 +241,9 @@ export class BatchController {
message: "배치 설정을 찾을 수 없습니다."
});
}
// 스케줄러에서 배치 스케줄 업데이트 (활성화 시 즉시 스케줄 등록)
await BatchSchedulerService.updateBatchSchedule(Number(id));
return res.json({
success: true,