diff --git a/cli/src/commands/put-stream.js b/cli/src/commands/put-stream.js index c13e48fffc2c99d98df403043c70356c632ec851..dfa0b233bb290b20c6491d286bac78f922768b85 100644 --- a/cli/src/commands/put-stream.js +++ b/cli/src/commands/put-stream.js @@ -75,7 +75,7 @@ module.exports.handler = handleErrors(async (argv: {}) => { // if (json.action !== "END") { // queue.push(json); // } else { - console.log(json); + // console.log(json); // } }); } diff --git a/sfds/index.js b/sfds/index.js index 22a1df2617555deb0c7cc8894b8c126efdf2a818..fcf4c41562856d4255520cfb885a183a04130469 100644 --- a/sfds/index.js +++ b/sfds/index.js @@ -400,29 +400,22 @@ results = []; app.post("/bolt", function(req, res) { console.log("bolt state: " +req.body.state) - - // console.log(req.body); - // console.log(resolver(req.body)); - // queue.push(req.body) - // console.log(queue.length) res.send(resolver(req.body)); }); app.post("/spout", function(req, res) { queue.push(req.body) - // console.log(queue.length) res.send("got it"); }); + round_robin = 0 setInterval(function sync() { if (queue.length > 0) { const body = queue.pop(); - // print(clients.length) - // console.log("SENDING TO" + round_robin + " " + clients.length) - let url = "http://" + machineToIps[ clients[round_robin % clients.length] ] + ":3000/bolt/"; + let url = "http://" + machineToIps[clients[round_robin % clients.length] ] + ":3000/bolt/"; round_robin += 1; fetch(url, { method: "post",