Skip to content
Snippets Groups Projects
Commit 475bb5db authored by IsolatedSushi's avatar IsolatedSushi
Browse files

Update webSocketGateway.js

parent 3cff15f2
No related branches found
No related tags found
1 merge request!13Major update
......@@ -103,6 +103,9 @@ function getProjectorConnection(ws,client){
function getKNNConnection(connection){
connection.knnConn.client.getIDfromServer({},function(error,response){
if(!response){
return;
}
console.log(error);
connection.knnConn.id = response["id"];
const meta = new grpc.Metadata();
......@@ -185,6 +188,7 @@ function SetupKProjectors(amount,connection){
//Create that amount of grpc connections
for(var i = 0; i< amount; i+=1){
var grpcConnection = getProjectorConnection(connection.ws,connection.projectorConn.client);
console.log("test")
allCalls.push(grpcConnection)
}
connection.projectorConn.calls = allCalls;
......@@ -222,7 +226,7 @@ function sendRowToServer(row,lineIndex,connection) {
}
function sendRowToKNN(trainingSetRow,connection){
if(!connection.knnConn){
if(!connection.knnConn.calls || connection.knnConn.calls.length == 0){
return;
}
......
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