Skip to content

Commit 8a5961e

Browse files
committed
Allow tasks to be queued when inside jobs
1 parent cfb82aa commit 8a5961e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/JobsResource.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Operation, Task, TaskEventData, TaskStatus } from './TasksResource';
33

44
export type JobEvent = 'created' | 'updated' | 'finished' | 'failed';
55
export type JobStatus = 'processing' | 'finished' | 'error';
6+
export type JobTaskStatus = Task['status'] | 'queued'
67
export interface JobEventData { job: Job }
78

89
export interface Job {
@@ -14,9 +15,10 @@ export interface Job {
1415
ended_at: string | null;
1516
tasks: JobTask[];
1617
}
17-
type NotPresentWhenInsideJob = 'job_id'
18+
type NotPresentWhenInsideJob = 'job_id' | 'status'
1819
interface JobTask extends Omit<Task, NotPresentWhenInsideJob> {
1920
name: string;
21+
status: JobTaskStatus;
2022
}
2123

2224
export default class JobsResource {

0 commit comments

Comments
 (0)