타입스크립트 에러 수정

This commit is contained in:
kjs
2025-12-01 15:30:25 +09:00
parent da6ac92391
commit b1b9e4ad93
7 changed files with 151 additions and 33 deletions

View File

@@ -1,10 +1,10 @@
import cron from "node-cron";
import cron, { ScheduledTask } from "node-cron";
import { BatchService } from "./batchService";
import { BatchExecutionLogService } from "./batchExecutionLogService";
import { logger } from "../utils/logger";
export class BatchSchedulerService {
private static scheduledTasks: Map<number, cron.ScheduledTask> = new Map();
private static scheduledTasks: Map<number, ScheduledTask> = new Map();
/**
* 모든 활성 배치의 스케줄링 초기화
@@ -175,7 +175,7 @@ export class BatchSchedulerService {
// 실행 로그 업데이트 (실패)
if (executionLog) {
await BatchExecutionLogService.updateExecutionLog(executionLog.id, {
execution_status: "FAILURE",
execution_status: "FAILED",
end_time: new Date(),
duration_ms: Date.now() - startTime.getTime(),
error_message:
@@ -396,4 +396,11 @@ export class BatchSchedulerService {
return { totalRecords, successRecords, failedRecords };
}
/**
* 개별 배치 작업 스케줄링 (scheduleBatch의 별칭)
*/
static async scheduleBatchConfig(config: any) {
return this.scheduleBatch(config);
}
}