Skip to content
Snippets Groups Projects
Commit 89e8a6f8 authored by arshiam2's avatar arshiam2
Browse files

update

parent ab3619b6
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ async function getCSVdata() { ...@@ -37,7 +37,7 @@ async function getCSVdata() {
]; ];
let message = parsed.split(",")[3]; let message = parsed.split(",")[3];
messages.push(message); messages.push(message);
if (messages.length == 10000) { if (messages.length == 5000) {
allMessages.push(messages); allMessages.push(messages);
const body = { action: "START", state: messages[0] }; const body = { action: "START", state: messages[0] };
// console.log(body) // console.log(body)
......
...@@ -410,13 +410,11 @@ app.post("/spout", function(req, res) { ...@@ -410,13 +410,11 @@ app.post("/spout", function(req, res) {
}); });
app.get("/sink", function(req, res) { app.get("/sink", function(req, res) {
// console.log("bolt state: " +req.body.state)
if (results.length > 0) { if (results.length > 0) {
res.send(results.pop()); res.send(results.pop());
} else { } else {
res.send("DONE"); res.send("DONE");
} }
// res.send("IM A SINK");
}); });
...@@ -438,7 +436,6 @@ setInterval(function sync() { ...@@ -438,7 +436,6 @@ setInterval(function sync() {
queue.push(json); queue.push(json);
} else { } else {
results.push(json.state) results.push(json.state)
console.log(results.length)
console.log("result: " + json.state); console.log("result: " + json.state);
} }
}); });
......
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