Skip to content
Snippets Groups Projects
Commit 1921da3a authored by arshiam2's avatar arshiam2
Browse files

update

parent f2cc2b65
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ const fetch = require("node-fetch"); ...@@ -12,7 +12,7 @@ const fetch = require("node-fetch");
const handleErrors = require("../utils/handleErrors"); const handleErrors = require("../utils/handleErrors");
const getMaster = require("../utils/getMaster"); const getMaster = require("../utils/getMaster");
module.exports.command = "put-stream"; module.exports.command = "put-stream [name]";
module.exports.describe = "Writes localfilename to the SDFS as sdfsfilename."; module.exports.describe = "Writes localfilename to the SDFS as sdfsfilename.";
module.exports.builder = (yargs: any) => yargs; module.exports.builder = (yargs: any) => yargs;
...@@ -62,7 +62,7 @@ module.exports.handler = handleErrors(async (argv: {}) => { ...@@ -62,7 +62,7 @@ module.exports.handler = handleErrors(async (argv: {}) => {
setInterval(function sync() { setInterval(function sync() {
if (queue.length > 0) { if (queue.length > 0) {
const body = queue.pop(); const body = queue.pop();
var target = "http://"+ master + ":3000/spout/"; var target = "http://"+ master + ":3000/spout/" + argv.name;
console.log(target) console.log(target)
console.log(JSON.stringify(body)) console.log(JSON.stringify(body))
fetch(target, { fetch(target, {
......
...@@ -406,8 +406,8 @@ app.post("/bolt", function(req, res) { ...@@ -406,8 +406,8 @@ app.post("/bolt", function(req, res) {
res.send(resolver(req.body)); res.send(resolver(req.body));
}); });
app.post("/spout", function(req, res) { app.post("/spout/:name", function(req, res) {
// console.log(req.body); console.log(req.params.name);
queue.push(req.body) queue.push(req.body)
// console.log(queue.length) // console.log(queue.length)
res.send("got it"); res.send("got it");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment