feat: 배치 관리 시스템 테스트 및 업데이트 기능 개선
- 배치 스케줄러 서비스 안정성 향상 - 외부 DB 연결 서비스 개선 - 배치 컨트롤러 및 관리 컨트롤러 업데이트 - 프론트엔드 배치 관리 페이지 개선 - Prisma 스키마 업데이트
This commit is contained in:
@@ -112,7 +112,7 @@ export class BatchSchedulerService {
|
||||
/**
|
||||
* 배치 설정 업데이트 시 스케줄 재등록
|
||||
*/
|
||||
static async updateBatchSchedule(configId: number) {
|
||||
static async updateBatchSchedule(configId: number, executeImmediately: boolean = true) {
|
||||
try {
|
||||
// 기존 스케줄 제거
|
||||
await this.unscheduleBatchConfig(configId);
|
||||
@@ -132,6 +132,12 @@ export class BatchSchedulerService {
|
||||
if (config.is_active === 'Y') {
|
||||
await this.scheduleBatchConfig(config);
|
||||
logger.info(`배치 스케줄 업데이트 완료: ${config.batch_name} (ID: ${configId})`);
|
||||
|
||||
// 활성화 시 즉시 실행 (옵션)
|
||||
if (executeImmediately) {
|
||||
logger.info(`🚀 배치 활성화 즉시 실행: ${config.batch_name} (ID: ${configId})`);
|
||||
await this.executeBatchConfig(config);
|
||||
}
|
||||
} else {
|
||||
logger.info(`비활성화된 배치 스케줄 제거: ${config.batch_name} (ID: ${configId})`);
|
||||
}
|
||||
@@ -239,7 +245,13 @@ export class BatchSchedulerService {
|
||||
firstMapping.from_api_key!,
|
||||
firstMapping.from_table_name,
|
||||
firstMapping.from_api_method as 'GET' | 'POST' | 'PUT' | 'DELETE' || 'GET',
|
||||
mappings.map((m: any) => m.from_column_name)
|
||||
mappings.map((m: any) => m.from_column_name),
|
||||
100, // limit
|
||||
// 파라미터 정보 전달
|
||||
firstMapping.from_api_param_type,
|
||||
firstMapping.from_api_param_name,
|
||||
firstMapping.from_api_param_value,
|
||||
firstMapping.from_api_param_source
|
||||
);
|
||||
|
||||
if (apiResult.success && apiResult.data) {
|
||||
|
||||
Reference in New Issue
Block a user