后端架构更新

This commit is contained in:
super
2026-04-27 09:18:10 +08:00
parent 03e697f5d3
commit 225b525ba1
150 changed files with 7013 additions and 804 deletions

View File

@@ -559,7 +559,7 @@ function statusClass(status?: string) {
}
function canDownload(item: PatrolDeleteHistoryItem) {
return Boolean(item.resultId && (item.outputFilename || item.downloadUrl));
return Boolean(item.resultId && (item.fileReady || item.downloadUrl));
}
function saveMatchedItems() {
@@ -717,14 +717,20 @@ async function refreshActiveTaskProgress(taskIds?: number[]) {
function startHistoryPolling() {
stopHistoryPolling();
if (!hasQueueWork.value) return;
historyPollTimer = window.setInterval(() => {
void refreshActiveTaskProgress();
}, getTaskPollIntervalMs() * 2);
const run = async () => {
historyPollTimer = null;
if (!hasQueueWork.value) return;
await refreshActiveTaskProgress();
if (hasQueueWork.value) {
historyPollTimer = window.setTimeout(run, getTaskPollIntervalMs() * 2);
}
};
historyPollTimer = window.setTimeout(run, getTaskPollIntervalMs() * 2);
}
function stopHistoryPolling() {
if (historyPollTimer) {
window.clearInterval(historyPollTimer);
window.clearTimeout(historyPollTimer);
historyPollTimer = null;
}
}