node-red redeploy flow using REST from within node-red

≯℡__Kan透↙ 提交于 2021-01-29 05:00:09

问题


I have a node-red flow in bluemix that uses dash-db nodes also. So each time some dash db maintenance or some other reason, this db connection gets lost and all writes fail. When i redeploy, everything is fine again. Bluemix shows only logs of last few hours hence I am finding it very difficult to debug. Meanwhile i was thinking of doing an automatic redeploy after i detect this issue to avoid losing writes. Can this be done using GET /flows followed by POST /flows in the same node-red app itself?


回答1:


  1. it would be worth raising this as an issue with the dash-db nodes so the author can help address it - https://github.com/smchamberlin/node-red-nodes-cf-sqldb-dashdb

  2. Yes, you can post back the flows. The full admin http api is documented here: http://nodered.org/docs/api/admin/ - have a look at the 'reload' option on /flows.



来源:https://stackoverflow.com/questions/36326326/node-red-redeploy-flow-using-rest-from-within-node-red

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!