diff --git a/routes/api.js b/routes/api.js index 3b11390..6a76aba 100644 --- a/routes/api.js +++ b/routes/api.js @@ -307,6 +307,7 @@ var runnerFree = function(runner){ } delete label2runner[runner.label]; + console.log(`Runner freed ${runner.label}.`, worker); workers.startRunners({worker: runner.worker}); }; diff --git a/testAPI.js b/testAPI.js index 3131701..d2b3f21 100644 --- a/testAPI.js +++ b/testAPI.js @@ -52,8 +52,10 @@ sleep(${sleepTime}) let __do = function(till){ + if(!till) return ; + callRunner(String(Math.random())[3]); - setTimeout(__do, 1000, --till); + setTimeout(__do, 1500, --till); }; -__do(50) \ No newline at end of file +__do(30) \ No newline at end of file