fix: harden extraction batch handling
Deploy contracts-flask / validate (push) Canceled after 0s

This commit is contained in:
Repinoid
2026-10-31 19:06:34 +03:00
parent 9c73a730d1
commit 79de42da96
6 changed files with 79 additions and 21 deletions
+7 -2
View File
@@ -162,7 +162,10 @@ async function runClassify() {
btn.disabled = false;
return;
}
btn.innerHTML = '✓ ' + completed + '/' + total + ' документов извлечено';
// Partial jobs are terminal and usable, but must not look like full success.
var failed = d.failed || 0;
btn.innerHTML = (failed ? '⚠ ' : '✓ ') + completed + '/' + total + ' документов извлечено'
+ (failed ? ' | ошибок: ' + failed : '');
stepDone('stepClassify');
stepActive('stepGroups');
loadGroupsAction();
@@ -212,7 +215,9 @@ async function runClassify() {
if (data.v3 && data.failed) summary += ' | ошибок: ' + data.failed;
if (data.garbage) summary += ' | 🗑️ ' + data.garbage + ' мусор';
if (data.types) summary += ' | ' + Object.entries(data.types).map(function (e) { return e[1] + '×' + e[0]; }).join(', ');
btn.innerHTML = '✓ ' + summary + ' (' + Math.round((Date.now() - start) / 1000) + 'с)';
// Continue to dossier rendering for partial success while keeping its warning visible.
btn.innerHTML = (data.v3 && data.partial ? '⚠ ' : '✓ ') + summary
+ ' (' + Math.round((Date.now() - start) / 1000) + 'с)';
stepDone('stepClassify');
stepActive('stepGroups');
loadGroupsAction();