Fix bug where output was not loading after job finished and cancel button was shown instead of delete

This commit is contained in:
mabashian 2021-03-19 10:48:05 -04:00
parent eb4dca9dc1
commit 6495779e40

View File

@ -319,8 +319,8 @@ function JobOutput({
if (data.final_counter) {
jobSocketCounter.current = data.final_counter;
}
if (job.status) {
setJobStatus(job.status);
if (data.status) {
setJobStatus(data.status);
}
}
});
@ -393,7 +393,10 @@ function JobOutput({
} = useDismissableError(deleteError);
const monitorJobSocketCounter = () => {
if (jobSocketCounter.current === remoteRowCount) {
if (
jobSocketCounter.current === remoteRowCount &&
!isJobRunning(job.status)
) {
clearInterval(interval.current);
}
if (jobSocketCounter.current > remoteRowCount && isMounted.current) {