feat: retry 3 times to download a repository

This commit is contained in:
tdurieux
2021-09-26 08:01:52 +02:00
parent fafeee02ec
commit dc1ff2d0b8
3 changed files with 8 additions and 5 deletions

View File

@@ -185,7 +185,7 @@ export default class Repository {
this._model.anonymizeDate = new Date();
console.log(`${this._model.repoId} will be updated to ${newCommit}`);
await this.resetSate("preparing");
await downloadQueue.add(this, { jobId: this.repoId });
await downloadQueue.add(this, { jobId: this.repoId, attempts: 3 });
}
}
}