Refactor UUID generation, remove unused logger and encryption utilities, and clean up request handling
- Updated `generateUUID` function for improved readability and performance. - Deleted `logger.ts`, `other.ts`, `request.ts`, `storage.ts`, `tansParams.ts`, and `validate.ts` as they were no longer needed. - Simplified TypeScript configuration by removing unnecessary paths and aliases. - Enhanced Vite configuration for better project structure and maintainability.
This commit is contained in:
40
runtime-shared/lib/task-types.ts
Normal file
40
runtime-shared/lib/task-types.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
export type SubTaskStatus = 'pending' | 'running' | 'success' | 'failed';
|
||||
|
||||
export interface SubTask {
|
||||
id: string;
|
||||
taskId: string;
|
||||
scriptId: string;
|
||||
name: string;
|
||||
status: SubTaskStatus;
|
||||
progress: number;
|
||||
message: string;
|
||||
stdoutTail: string;
|
||||
stderrTail: string;
|
||||
error?: string;
|
||||
startedAt: string;
|
||||
completedAt?: string;
|
||||
}
|
||||
|
||||
export type TaskStatus = 'pending' | 'running' | 'success' | 'partial_failed' | 'failed';
|
||||
|
||||
export interface Task {
|
||||
id: string;
|
||||
title: string;
|
||||
operation: 'open' | 'close';
|
||||
roomType: string;
|
||||
dateRange: [string, string];
|
||||
status: TaskStatus;
|
||||
subTasks: SubTask[];
|
||||
roomList: any[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface TaskProgressPayload {
|
||||
taskId: string;
|
||||
subTaskId: string;
|
||||
progress?: number;
|
||||
message?: string;
|
||||
stdoutTail?: string;
|
||||
stderrTail?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user