Skip to content

Commit 9e708fd

Browse files
committed
docs: update background jobs plugin docs
AdminForth/1977/background-job-append-succeeds
1 parent 0f8e4fd commit 9e708fd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎adminforth/documentation/docs/tutorial/09-Plugins/23-background-jobs.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ type JobTask = {
387387
task_number: number;
388388
task_counter: number;
389389
};
390-
status: 'SCHEDULED' | 'IN_PROGRESS' | 'DONE' | 'FAILED';
390+
status: 'SCHEDULED' | 'IN_PROGRESS' | 'DONE' | 'FAILED' | 'DELETED';
391391
};
392392

393393
const tasks = ref<JobTask[]>([]);
@@ -406,6 +406,7 @@ const taskStatusLabels: Record<JobTask['status'], string> = {
406406
IN_PROGRESS: 'running',
407407
DONE: 'done',
408408
FAILED: 'failed',
409+
DELETED: 'deleted',
409410
};
410411

411412
const props = defineProps<{
@@ -699,7 +700,7 @@ getJobStateField(jobId: string, key: string)
699700
getJobState(jobId: string)
700701
//add task to the running job
701702
addNewTasksToExistingJob(jobId: string, tasks: taskType[])
702-
//delete task from the running job (if not started yet)
703+
//delete task from the running job (if not started yet). The task is not removed, it gets the DELETED status and keeps its index
703704
deleteTasksFromExistingJob(jobId: string, taskIndex: number)
704705
/**
705706
*

‎dev-demo/custom/JobCustomComponent.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type JobTask = {
3333
task_number: number;
3434
task_counter: number;
3535
};
36-
status: 'SCHEDULED' | 'IN_PROGRESS' | 'DONE' | 'FAILED';
36+
status: 'SCHEDULED' | 'IN_PROGRESS' | 'DONE' | 'FAILED' | 'DELETED';
3737
};
3838
3939
const tasks = ref<JobTask[]>([]);
@@ -52,6 +52,7 @@ const taskStatusLabels: Record<JobTask['status'], string> = {
5252
IN_PROGRESS: 'running',
5353
DONE: 'done',
5454
FAILED: 'failed',
55+
DELETED: 'deleted',
5556
};
5657
5758
const props = defineProps<{

0 commit comments

Comments
 (0)