chore(release): 1.1.36 - 应用内流式直连下载、透明化直链与排队卡死彻底修复
TallyNote release / linux-x64 (push) Successful in 6m21s
TallyNote release / linux-x64 (push) Successful in 6m21s
This commit is contained in:
@@ -63,6 +63,7 @@ import {
|
||||
readCachedRelease,
|
||||
writeUpdateRequest,
|
||||
cancelUpdateJob,
|
||||
triggerInProcessDownload,
|
||||
type UpdateRequest,
|
||||
} from "./update-service.js";
|
||||
|
||||
@@ -938,6 +939,7 @@ export async function buildApp(database: DatabaseContext, config: AppConfig) {
|
||||
// task (or the latest successful completion for confirmation).
|
||||
const row = database.sqlite.prepare(`
|
||||
SELECT id, operation, status, version, platform, asset_name AS assetName,
|
||||
asset_url AS assetUrl, release_url AS releaseUrl,
|
||||
size_bytes AS sizeBytes, error_message AS errorMessage,
|
||||
created_at AS createdAt, updated_at AS updatedAt, completed_at AS completedAt,
|
||||
downloaded_bytes AS downloadedBytes, download_started_at AS downloadStartedAt,
|
||||
@@ -1179,6 +1181,7 @@ export async function buildApp(database: DatabaseContext, config: AppConfig) {
|
||||
database.sqlite.prepare("UPDATE update_jobs SET status='failed', error_message=?, updated_at=? WHERE id=?").run("无法创建系统更新请求", Date.now(), id);
|
||||
throw new AppError(503, "UPDATE_QUEUE_FAILED", "无法提交更新请求,请检查服务安装权限");
|
||||
}
|
||||
triggerInProcessDownload(database.sqlite, config, id, cachedAsset, cachedAsset.sha256);
|
||||
reply.header("Cache-Control", "no-store");
|
||||
return reply.code(202).send({ job: { id, status: "queued", operation: "download", version } });
|
||||
});
|
||||
@@ -1199,6 +1202,7 @@ export async function buildApp(database: DatabaseContext, config: AppConfig) {
|
||||
reconcileOrphanedUpdateJobs(database.sqlite, config);
|
||||
const row = database.sqlite.prepare(`
|
||||
SELECT id, operation, status, version, platform, asset_name AS assetName,
|
||||
asset_url AS assetUrl, release_url AS releaseUrl,
|
||||
size_bytes AS sizeBytes, error_message AS errorMessage,
|
||||
created_at AS createdAt, updated_at AS updatedAt, completed_at AS completedAt,
|
||||
downloaded_bytes AS downloadedBytes, download_started_at AS downloadStartedAt,
|
||||
|
||||
Reference in New Issue
Block a user