后端架构更新

This commit is contained in:
super
2026-04-27 09:18:10 +08:00
parent 0caf62c3d2
commit 995e2ee65a
141 changed files with 6957 additions and 772 deletions

View File

@@ -557,7 +557,7 @@ function statusClass(status?: string) {
}
function canDownload(item: QueryAsinHistoryItem) {
return Boolean(item.resultId && (item.outputFilename || item.downloadUrl));
return Boolean(item.resultId && (item.fileReady || item.downloadUrl));
}
function saveMatchedItems() {
@@ -748,14 +748,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;
}
}