Spaces:
Sleeping
Sleeping
Download src/types/task.types.ts from sardarbipul/test: direct link, hf CLI and curl.
- Browser
- Download file 814 Bytes
-
https://huggingface.co/spaces/sardarbipul/test/resolve/main/src/types/task.types.ts
- Command line
-
hf download hf://spaces/sardarbipul/test/src/types/task.types.ts
-
curl -L -o task.types.ts https://huggingface.co/spaces/sardarbipul/test/resolve/main/src/types/task.types.ts
814 Bytes
| export type TaskStatus = 'pending' | 'leased' | 'completed' | 'failed'; | |
| export interface ITask { | |
| taskId: string; | |
| startRow: number; | |
| endRow: number; | |
| startOffset?: number; | |
| endOffset?: number; | |
| workerId: string | null; | |
| status: TaskStatus; | |
| retries: number; | |
| progress: number; // 0 to 100 | |
| rowsProcessed?: number; | |
| leaseUntil: string | null; // ISO Date string | |
| createdAt: string; // ISO Date string | |
| updatedAt: string; // ISO Date string | |
| completedAt: string | null; // ISO Date string | |
| errorMessage?: string | null; | |
| } | |
| export interface CreateTaskInput { | |
| startRow: number; | |
| endRow: number; | |
| } | |
| export interface CreateTasksBatchInput { | |
| totalRows: number; | |
| chunkSize?: number; | |
| } | |
| export interface TaskFilter { | |
| status?: TaskStatus; | |
| workerId?: string; | |
| limit?: number; | |
| offset?: number; | |
| } | |