Speed up artifact downloads
This commit is contained in:
@@ -307,7 +307,7 @@ export function ServersPage({ session, operations, onNavigate }: PageComponentPr
|
||||
execute: async () => {
|
||||
if (action === "download-run") {
|
||||
const reference = await platformApiClient.downloadLatestRunDistribution(instance.id);
|
||||
await downloadArtifactReference(reference, (artifactId, offset, limit) => platformApiClient.readArtifactContent(artifactId, offset, limit));
|
||||
await downloadArtifactReference(reference, (artifactId) => platformApiClient.downloadArtifactContent(artifactId));
|
||||
return `run 下载已开始,artifact ${reference.artifactId},文件 ${safeArtifactFilename(reference.filename)}`;
|
||||
}
|
||||
if (action === "push-run-update") {
|
||||
@@ -354,7 +354,7 @@ export function ServersPage({ session, operations, onNavigate }: PageComponentPr
|
||||
executeStageIndex: 1,
|
||||
execute: async () => {
|
||||
const reference = await platformApiClient.openArtifactDownload(artifact.artifactId);
|
||||
await downloadArtifactReference(reference, (artifactId, offset, limit) => platformApiClient.readArtifactContent(artifactId, offset, limit));
|
||||
await downloadArtifactReference(reference, (artifactId) => platformApiClient.downloadArtifactContent(artifactId));
|
||||
return `run 下载已开始,文件 ${safeArtifactFilename(reference.filename)}`;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user