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);
}
}
} 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);
}
});
--- /dev/null
+var log = require("./log.js");
+
+function startDebugTimer() {
+ if(typeof global.repoproxy != "undefined") {
+ if(global.repoproxy.loglevel >= 5) {
+ log.debug("starting debug timer on loglevel");
+ setInterval(debugTimer, 1500);
+ }
+ }
+}
+
+function debugTimer() {
+ log.debug("globals: ", global.repoproxy);
+ log.debug("*****TICK******");
+}
+
+exports.startDebugTimer = startDebugTimer;
\ No newline at end of file
var age = curtime - ctime;
log.debug("age is (%d) for (%d)", age, metaAge);
- if(age < metaAge) {
- // TODO: cleanup repomd directory
+ if(age > metaAge) {
cache.moveToCleanup(repomddir);
log.info("Sending repomd directory to trash for cleanup (%s)", repomddir);
}
if(typeof files[0] != 'undefined') fileCheck(0)
else log.info("Skipping (yum) file check as there are none... apprently?");
-
}
exports.maintain = maintain;
\ No newline at end of file
var cache = require("./lib/cache.js");
var maintain = require("./lib/maintain.js");
var log = require("./lib/log.js");
+var debug = require("./lib/debug.js");
// first we load the config...
log.info("Starting cache maintenance timer");
maintain.startTimer();
+// start the debug timer, if we should
+debug.startDebugTimer();
+
// next we start our main request loop
http.createServer(router.routeRequest).listen(global.repoproxy.listenPort);
repo:fedora:yum:http://ftp.iinet.net.au/pub/fedora/linux/:7:120
repo:ubuntu:apt:http://ftp.iinet.net.au/pub/ubuntu/:1:120
-# level for logging (1 = error, 2 = warning, 3=info, 4=debug);
+# level for logging (1 = error, 2 = warning, 3=info, 4=debug, 5=debug with timer);
loggerlevel:4