add pipeUrlToFileWithRetry function to retry file downloads 3 times

This commit is contained in:
Henry Oswald
2020-05-14 13:09:57 +01:00
parent 7254a025ae
commit 0bd99a3edc
5 changed files with 153 additions and 109 deletions

View File

@@ -95,7 +95,7 @@ module.exports = UrlCache = {
}
if (needsDownloading) {
logger.log({ url, lastModified }, 'downloading URL')
return UrlFetcher.pipeUrlToFile(
return UrlFetcher.pipeUrlToFileWithRetry(
url,
UrlCache._cacheFilePathForUrl(project_id, url),
error => {