Skip to content

Commit

Permalink
fix(frontend): clear interval on job run
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Oct 6, 2022
1 parent 2c5b32b commit 065dcc9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/lib/components/TestJobLoader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
args: Record<string, any>
): Promise<void> {
try {
if (intervalId) {
clearInterval(intervalId)
}
intervalId && clearInterval(intervalId)
if (isLoading && job) {
JobService.cancelQueuedJob({
workspace: $workspaceStore!,
Expand Down Expand Up @@ -63,7 +61,7 @@
export async function watchJob(testId: string) {
console.log('watch jobs')
intervalId && clearInterval(intervalId)
job = undefined
syncIteration = 0
const isCompleted = await loadTestJob(testId)
Expand Down

0 comments on commit 065dcc9

Please sign in to comment.