X-Git-Url: http://git.pjr.cc/?p=nodejs-repoproxy.git;a=blobdiff_plain;f=lib%2Fcache.js;h=5a01871b86b7e06d966dde64bd69df6b8329dc38;hp=4f98d3c8e32b80e986d8a98fddd92df7509614e4;hb=51793863317f57b5e1d7d6d05043a8b8d3fee746;hpb=3933776341028e83d89e0f888fff3e6319230abf diff --git a/lib/cache.js b/lib/cache.js index 4f98d3c..5a01871 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -103,10 +103,8 @@ function getAndService(unify, xpath, filesize) { log.debug("calling in here with filesize, ", filesize) unify.b.writeHead(200, {'Content-Length' : filesize}); - global.repoproxy.downloads[unify.fullFilePath] = 1; - http.get(xpath, function(res) { var file = fs.createWriteStream(unify.fullFilePath); @@ -193,7 +191,8 @@ function inlineService(unify) { } } } else { - log.debug("inline service - we're in a very bad place"); + log.error("inline service - we're in a very bad place, how we ended up here we dont know, but we need to crash"); + process.exit(10); } }); @@ -346,10 +345,6 @@ function moveToCleanup(file_or_dir) { fs.renameSync(file_or_dir.replace(/\/$/, ""), toloc); } -function cleanupRoutine() { - -} - exports.serviceDirectory = serviceDirectory; exports.moveToCleanup = moveToCleanup;