Adding some logging."
This commit is contained in:
parent
2fa3ae985b
commit
36db6be4bc
@ -144,9 +144,10 @@ var Worker = (function(){
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
proto.sync = function(){
|
proto.sync = function(callback){
|
||||||
var worker = this;
|
var worker = this;
|
||||||
worker.isSyncing = true;
|
worker.isSyncing = true;
|
||||||
|
callback = callback || __empty;
|
||||||
// this will call the droplet or the droplet will send the data using a cron job
|
// this will call the droplet or the droplet will send the data using a cron job
|
||||||
|
|
||||||
// mainly to update the active runners on the worker
|
// mainly to update the active runners on the worker
|
||||||
@ -180,6 +181,8 @@ var Worker = (function(){
|
|||||||
info.push(mapOut);
|
info.push(mapOut);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
console.log(`RUNNERS FOUND[=> ${worker.ip}`);
|
||||||
|
console.log(`RUNNERS FOUND[=> ${info}`);
|
||||||
worker.availrunners = [];
|
worker.availrunners = [];
|
||||||
|
|
||||||
for (let idx = 0, stop = runners.length; idx < stop; idx++){
|
for (let idx = 0, stop = runners.length; idx < stop; idx++){
|
||||||
@ -193,6 +196,8 @@ var Worker = (function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
worker.isBuildingRunners = false;
|
worker.isBuildingRunners = false;
|
||||||
|
console.log(`RUNNERS AVAILABLE[=> ${worker.availrunners}`);
|
||||||
|
callback(worker);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -245,8 +250,7 @@ var Worker = (function(){
|
|||||||
// Just send the job over and set a timeout
|
// Just send the job over and set a timeout
|
||||||
// to wait before checking runners
|
// to wait before checking runners
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
worker.sync();
|
worker.sync(args.callback);
|
||||||
args.callback(worker);
|
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user