cancel flow on run

This commit is contained in:
Ruben Fiszel
2022-08-23 22:08:52 +02:00
parent cf4d2ea68c
commit b70e1ce4ff
@@ -27,7 +27,12 @@
const dispatch = createEventDispatcher()
export async function runPreview(args: Record<string, any>) {
job = undefined
job?.type == 'QueuedJob' &&
(await JobService.cancelQueuedJob({
workspace: $workspaceStore!,
id: job.id,
requestBody: {}
}))
intervalId && clearInterval(intervalId)
jobId = await runFlowPreview(args, newFlow)