added test to check compile should continue on error downloading http

resource

also improved logging
This commit is contained in:
Henry Oswald
2015-09-09 09:44:38 +01:00
parent 6fae6ff40c
commit 440d1c605f
2 changed files with 6 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ module.exports = ResourceWriter =
if resource.url?
UrlCache.downloadUrlToFile project_id, resource.url, path, resource.modified, (err)->
if err?
logger.err err:err, "error downloading file for resources"
logger.err err:err, project_id:project_id, path:path, resource_url:resource.url, modified:resource.modified, "error downloading file for resources"
callback() #try and continue compiling even if http resource can not be downloaded at this time
else
fs.writeFile path, resource.content, callback