-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does a redeploy "cleanup" previous deploys? #20
Comments
So, there's quite a bit of hackery in this... For pagenodes I can run johnny-five in a webworker and just dump the webworker on redeploy: https://github.com/monteslu/pagenodes/blob/master/src/red/nodes/nodeDefs/io/lib/nodebotNode.js#L168 Works like a champ. For node-red i have to try and clean up after myself since the same javascript VM persists. What this means is that I try clearing intervals and disconnecting things: https://github.com/monteslu/node-red-contrib-gpio/blob/master/lib/nodebotNode.js#L43-L99 The problem with my node-red method of cleaning up is I might be leaving stuff out there that my own testing hasn't noticed. I cant try and reproduce your specific error if you want to share some code from the johnny5 node you're deploying. A better long term solution might be to use node's clustering mechanism to spawn a thread for each connected nodebot. I need to investing this some more. |
Here is an attachment including my exported flow: I also produced a video on using the "Johnny5" node: https://www.youtube.com/watch?v=zy-uMLru7fQ This doesn't illustrate the problem, but does show the example flow. If I change the flow and redeploy, pressing the button shows the debug happening as many times as I have redeployed. |
This is still an issue: "button shows the debug happening as many times as I have redeployed" |
I am using Node-RED 0.14.6 with Node.js 4.4.7. When I deploy a flow that contains a "Johnny5" node, all works well. If I change my logic and re-deploy, it is as though the previous deployment is still active concurrently with the new deployment. Does a redeployment cause the "cleanup" of previous deployments? When I stop Node-RED and restart it, all works again as desired until the next redeploy.
The text was updated successfully, but these errors were encountered: