diff --git a/sfds/index.js b/sfds/index.js index 539c0be83e6f8121ffb080c06a05a749eac9bdb7..05ca80668e861ab7ba5b733669d51beda949d605 100644 --- a/sfds/index.js +++ b/sfds/index.js @@ -406,16 +406,18 @@ app.post("/bolt", function(req, res) { res.send(resolver(req.body)); }); -app.post("/spout", function(req, res) { - // console.log(req.body); - queue.push(req.body) - // console.log(queue.length) +app.post("/spout/:name", function(req, res) { + + console.log(req.params.name) + // queue.push(req.body) res.send("got it"); }); round_robin = 0 +results = {} + setInterval(function sync() { if (queue.length > 0) { const body = queue.pop(); @@ -431,6 +433,7 @@ setInterval(function sync() { .then(res => res.json()) .then(json => { if (json.action !== "END") { + //can send back queue.push(json); } else { console.log(json.state);