Bug 42733: Job progress fix

waitForJobFinished previously had no handling for failed jobs or
non-200 responses — if the job API returned anything unexpected,
the recursive cy.wait() would silently stall waiting for a 2nd
poll that never came, producing a confusing timeout. Adds an
explicit "failed" status check and updates the intercept
to reproduce the exact CI failure (Apache returning 503 during
reset_all).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Pedro Amorim 2026-06-01 13:37:21 +00:00
parent 726b205be2
commit b6af7a6c3a
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 4 additions and 0 deletions

View File

@ -47,5 +47,9 @@ function updateProgress(job_id, callbacks) {
updateProgress(job_id, callbacks);
}, 1 * 1000);
}
}).fail(function () {
setTimeout(function () {
updateProgress(job_id, callbacks);
}, 1 * 1000);
});
}