ensure progress is updated correctly (#97889)

This commit is contained in:
Melissa Alvarez 2021-04-22 10:32:22 -04:00 committed by GitHub
parent 98c7d7da0a
commit 967b17275b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,10 +83,12 @@ export const CreateStepFooter: FC<Props> = ({ jobId, jobType, showProgress }) =>
}
setCurrentProgress(progressStats);
// Clear if job is completed or stopped (after having started)
if (
(progressStats.currentPhase === progressStats.totalPhases &&
progressStats.progress === 100) ||
jobStats.state === DATA_FRAME_TASK_STATE.STOPPED
(jobStats.state === DATA_FRAME_TASK_STATE.STOPPED &&
!(progressStats.currentPhase === 1 && progressStats.progress === 0))
) {
clearInterval(interval);
// Check job has started. Jobs that fail to start will also have STOPPED state