Added pool.start() so log event can be hooked in time for initialization

This commit is contained in:
Matthew Little 2014-01-16 12:27:27 -07:00
parent 1205706ca0
commit 524e366dba

View File

@ -33,14 +33,11 @@ var pool = module.exports = function pool(options, authorizeFn){
var emitWarningLog = function(key, text) { _this.emit('log', 'warning', key, text); };
var emitErrorLog = function(key, text) { _this.emit('log', 'error' , key, text); };
(function Init(){
//timeout used so onLog event can be hooked before we start initializing
setTimeout(function(){
SetupJobManager();
SetupVarDiff();
SetupDaemonInterface();
}, 10);
})();
this.start = function(){
SetupJobManager();
SetupVarDiff();
SetupDaemonInterface();
};
function SetupVarDiff(){