[agent-pipeline] rollback to 577e9c12
This commit is contained in:
@@ -13,9 +13,6 @@ export interface BatchConfig {
|
||||
save_mode?: 'INSERT' | 'UPSERT'; // 저장 모드 (기본: INSERT)
|
||||
conflict_key?: string; // UPSERT 시 충돌 기준 컬럼명
|
||||
auth_service_name?: string; // REST API 인증에 사용할 토큰 서비스명
|
||||
execution_type?: 'mapping' | 'node_flow';
|
||||
node_flow_id?: number;
|
||||
node_flow_context?: Record<string, unknown>;
|
||||
created_date?: Date;
|
||||
created_by?: string;
|
||||
updated_date?: Date;
|
||||
@@ -98,17 +95,6 @@ export interface BatchMappingRequest {
|
||||
cronSchedule: string;
|
||||
mappings: BatchMapping[];
|
||||
isActive?: boolean;
|
||||
executionType?: 'mapping' | 'node_flow';
|
||||
nodeFlowId?: number;
|
||||
nodeFlowContext?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/** 노드 플로우 목록 항목 (getNodeFlows 응답) */
|
||||
export interface NodeFlowItem {
|
||||
flow_id: number;
|
||||
flow_name: string;
|
||||
description?: string;
|
||||
created_date?: string;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
@@ -474,97 +460,6 @@ export class BatchAPI {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 노드 플로우 목록 조회
|
||||
*/
|
||||
static async getNodeFlows(): Promise<ApiResponse<NodeFlowItem[]>> {
|
||||
try {
|
||||
const response = await apiClient.get<ApiResponse<NodeFlowItem[]>>(
|
||||
"/batch-management/node-flows"
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("노드 플로우 목록 조회 오류:", error);
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : "노드 플로우 목록 조회에 실패했습니다.",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 배치 통계 (대시보드용)
|
||||
*/
|
||||
static async getBatchStats(): Promise<
|
||||
ApiResponse<{
|
||||
totalBatches: number;
|
||||
activeBatches: number;
|
||||
todayExecutions: number;
|
||||
todayFailures: number;
|
||||
}>
|
||||
> {
|
||||
try {
|
||||
const response = await apiClient.get<
|
||||
ApiResponse<{
|
||||
totalBatches: number;
|
||||
activeBatches: number;
|
||||
todayExecutions: number;
|
||||
todayFailures: number;
|
||||
}>
|
||||
>("/batch-management/stats");
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("배치 통계 조회 오류:", error);
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : "배치 통계 조회에 실패했습니다.",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 배치별 스파크라인 (최근 24시간 성공/실패 추이)
|
||||
*/
|
||||
static async getBatchSparkline(
|
||||
batchId: number
|
||||
): Promise<
|
||||
ApiResponse<Array<{ hour: number; status: string; count: number }>>
|
||||
> {
|
||||
try {
|
||||
const response = await apiClient.get<
|
||||
ApiResponse<Array<{ hour: number; status: string; count: number }>>
|
||||
>(`/batch-management/batch-configs/${batchId}/sparkline`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("배치 스파크라인 조회 오류:", error);
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : "스파크라인 조회에 실패했습니다.",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 배치 최근 실행 이력
|
||||
*/
|
||||
static async getBatchRecentLogs(
|
||||
batchId: number,
|
||||
limit: number = 5
|
||||
): Promise<ApiResponse<unknown[]>> {
|
||||
try {
|
||||
const response = await apiClient.get<ApiResponse<unknown[]>>(
|
||||
`/batch-management/batch-configs/${batchId}/recent-logs?limit=${limit}`
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("배치 최근 로그 조회 오류:", error);
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : "최근 로그 조회에 실패했습니다.",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BatchJob export 추가 (이미 위에서 interface로 정의됨)
|
||||
|
||||
Reference in New Issue
Block a user