Commit 4769acad by marwan

re push

parent 652497b5
......@@ -222,7 +222,7 @@ module.exports = function (RED) {
// Store local copies of the node configuration (as defined in the .html)
// this.host = n.host;
// this.port = n.port;
this.program = n.program;
node.program = n.program;
node.path = n.host;
node.wholemsg = (n.wholemsg === "true");
......@@ -238,7 +238,7 @@ module.exports = function (RED) {
function startconn() {// Connect to remote endpoint
getKernelList(filePath, configId).then(data => {
if (data.status == 0) {
var payload = { name: this.program }; // Your payload
var payload = { name: n.program }; // Your payload
axios.post(`http://${n.host}/api/kernels`, payload)
// axios.post(`http://notebook:10100/api/kernels`, payload)
......@@ -250,11 +250,11 @@ module.exports = function (RED) {
.catch(error => {
console.error('Error fetching data: ', error);
});
this.kernel = data
node.kernel = data
}
else {
console.log(data)
// this.kernel = data
node.kernel = data
var uri = `ws://${n.host}/api/kernels/${data.info.id}/channels`
console.log(uri)
var socket = new ws(uri);
......@@ -301,12 +301,10 @@ module.exports = function (RED) {
});
}
{
node.closing = false;
startconn();
// start outbound connection
}
node.on("close", function () {
// Workaround https://github.com/einaros/ws/pull/253
// Remove listeners from RED.server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment