Skip to content

Commit

Permalink
Fixed viewer sending ready update repeatedly
Browse files Browse the repository at this point in the history
resolves remainder of #440
  • Loading branch information
lucaro committed Oct 19, 2023
1 parent b8d348f commit 6bde35f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/app/viewer/task-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ export class TaskViewerComponent implements AfterViewInit, OnDestroy {
}
),
tap((hint) => {
this.state.pipe(switchMap(state => this.runService.getApiV2EvaluationByEvaluationIdByTaskIdReady(state.evaluationId, state.taskTemplateId))).subscribe()
this.state.pipe(
take(1), //use latest state, only do this once
switchMap(
state => this.runService.getApiV2EvaluationByEvaluationIdByTaskIdReady(state.evaluationId, state.taskTemplateId)
)
).subscribe()
})
).subscribe(n => this.currentTaskHint.next(n))

Expand Down

0 comments on commit 6bde35f

Please sign in to comment.