fix: fix repository download

This commit is contained in:
tdurieux
2021-09-08 16:08:51 +02:00
parent e036a80167
commit 7d4768a292
+2 -2
View File
@@ -67,7 +67,7 @@ router.get(
repo.status == "removing" || repo.status == "removing" ||
repo.status == "removed" repo.status == "removed"
) { ) {
throw new AnonymousError("repository_expired", this); throw new AnonymousError("repository_expired", repo);
} }
const fiveMinuteAgo = new Date(); const fiveMinuteAgo = new Date();
@@ -78,7 +78,7 @@ router.get(
repo.status != "preparing" repo.status != "preparing"
) { ) {
await repo.updateStatus("preparing"); await repo.updateStatus("preparing");
await downloadQueue.add(this, { jobId: repo.repoId }); await downloadQueue.add(repo, { jobId: repo.repoId });
} }
if (repo.status == "error") { if (repo.status == "error") {
throw new AnonymousError( throw new AnonymousError(