Update task status immediately on submit
This commit is contained in:
parent
313ca60b55
commit
8202fc43e8
1 changed files with 2 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
||||||
import type { TaskStatus } from "./ksp-task-grabber";
|
import type { TaskStatus } from "./ksp-task-grabber";
|
||||||
import type { TaskSubmitStatus, SubtaskSubmitStatus } from './ksp-submit-api'
|
import type { TaskSubmitStatus, SubtaskSubmitStatus } from './ksp-submit-api'
|
||||||
import * as api from './ksp-submit-api'
|
import * as api from './ksp-submit-api'
|
||||||
import { taskStatuses } from './task-status-cache'
|
import { taskStatuses, refresh as refreshTaskStatus } from './task-status-cache'
|
||||||
|
|
||||||
export let id: string;
|
export let id: string;
|
||||||
const taskFromCache: TaskStatus | undefined = $taskStatuses.get(id)
|
const taskFromCache: TaskStatus | undefined = $taskStatuses.get(id)
|
||||||
|
@ -129,6 +129,7 @@
|
||||||
|
|
||||||
async function upload(file: File) {
|
async function upload(file: File) {
|
||||||
const x = await api.submit(id, uploadSubtaskId!, file)
|
const x = await api.submit(id, uploadSubtaskId!, file)
|
||||||
|
refreshTaskStatus([id])
|
||||||
alert(x.verdict)
|
alert(x.verdict)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue