From 191851e2bbb8254cbafe7498eedfa2ccfbb43fa3 Mon Sep 17 00:00:00 2001 From: william Date: Sat, 28 May 2016 01:08:17 -0400 Subject: [PATCH] stuff --- routes/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/api.js b/routes/api.js index c1bcf02..882b2f0 100644 --- a/routes/api.js +++ b/routes/api.js @@ -80,7 +80,9 @@ var checkWorkersBalance = function(){ console.log('stopping workers balancing check'); isCheckingWorkers = false; - if(changed) checkWorkersBalance(); + if(changed) setTimeout(function(){ + checkWorkersBalance(); + }, 3000); }; var start @@ -131,6 +133,7 @@ var run = function(req, res, runner){ return request.post(httpOptions, function(error, response, body){ // console.log('runner response:', arguments) + console.log() body = JSON.parse(body); body['ip'] = getAvailrunner(runner).label;