Delete unfinished downloads in case of retry
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { appendFile, pathExists } from "fs-extra";
|
||||
import { appendFile, pathExists, rm } from "fs-extra";
|
||||
import fetch from "node-fetch";
|
||||
import { EOL } from "os";
|
||||
import { join } from "path";
|
||||
@@ -82,6 +82,9 @@ export class VariantAnalysisResultsManager extends DisposableObject {
|
||||
|
||||
const zipFilePath = join(resultDirectory, "results.zip");
|
||||
|
||||
// in case of restarted download delete possible artifact from previous download
|
||||
await rm(zipFilePath, { force: true });
|
||||
|
||||
const response = await fetch(repoTask.artifactUrl);
|
||||
|
||||
let responseSize = parseInt(response.headers.get("content-length") || "0");
|
||||
|
||||
Reference in New Issue
Block a user