feat(export): support safe background query exports

This commit is contained in:
zhangyaxi authored and GitHub committed 2026-07-29 03:18:06 +08:00
1 parent 2f44d36018
commit a07def6042
17 files changed
+577 -195

No files matched your search

@@ -229,10 +229,10 @@ export function useExportTracker() {
.replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/, "$1-$2-$3-$4-$5");
}
function addTask(tableName: string, format: string, filePath: string): ExportTask {
const exportId = generateUUID();
function addTask(tableName: string, format: string, filePath: string, exportId?: string): ExportTask {
const id = exportId ?? generateUUID();
const task = reactive<ExportTask>({
exportId,
exportId: id,
kind: "table-export",
tableName,
format,
@@ -242,7 +242,7 @@ export function useExportTracker() {
status: "Running",
errorMessage: null,
});
taskMap.set(exportId, task);
taskMap.set(id, task);
return task;
}