v0.0.42: таймер в статусе тикает только у текущего файла (остальные останавливаются при start)
Deploy drhider / validate (push) Canceled after 0s

This commit is contained in:
“Naeel”
2026-08-19 14:00:10 +04:00
parent 0453827b8b
commit c67fffbc56
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ if _sys_path_root not in sys.path:
sys.path.insert(0, _sys_path_root)
# Версия приложения (меняется при изменениях)
VERSION = "0.0.41"
VERSION = "0.0.42"
def create_app():
+5
View File
@@ -462,6 +462,11 @@ async function uploadFiles() {
activeES = new EventSource('/api/process_stream/' + currentSid);
activeES.addEventListener('start', function(e) {
const d = JSON.parse(e.data);
// Таймер тикает ТОЛЬКО у текущего файла; таймеры остальных останавливаем
for (const k in fileIntervals) {
clearInterval(fileIntervals[k]);
delete fileIntervals[k];
}
fileTimers[d.idx] = performance.now();
fileIntervals[d.idx] = setInterval(function() {
const elapsed = ((performance.now() - fileTimers[d.idx]) / 1000).toFixed(1);