Hi,
I send the file using ftp
(node-red-contrib-ftp) node, in case the sending fails, I want to resend with the specified number of times.
If the specified number of times fails to send the file, the error message will be displayed.
I have tried to execute with the flow as below, the error "Message exceeded maximum number of catches" has occurred, indicates that the catch
node has an internal fail-safe to prevent endless loops.
[{"id":"253f62e9.8c881e","type":"tab","label":"Catch FTP","disabled":false,"info":""},{"id":"958f10a1.7f7","type":"inject","z":"253f62e9.8c881e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":290,"y":180,"wires":[["faeb86e6.459f98"]]},{"id":"faeb86e6.459f98","type":"change","z":"253f62e9.8c881e","name":"","rules":[{"t":"set","p":"count","pt":"global","to":"15","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":180,"wires":[["102beac8.b0b405"]]},{"id":"b327d5f9.4a55f8","type":"catch","z":"253f62e9.8c881e","name":"catch [ftp] node","scope":["36599409.788abc"],"uncaught":false,"x":300,"y":360,"wires":[["46bbcb02.5fae34"]]},{"id":"36599409.788abc","type":"ftp in","z":"253f62e9.8c881e","ftp":"5c57a739.a7bd48","operation":"put","filename":"Test.ini","localFilename":"C:\\Temp\\Test.ini","name":"","x":890,"y":180,"wires":[[]]},{"id":"102beac8.b0b405","type":"change","z":"253f62e9.8c881e","name":"i = 0","rules":[{"t":"set","p":"i","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":180,"wires":[["36599409.788abc"]]},{"id":"46bbcb02.5fae34","type":"switch","z":"253f62e9.8c881e","name":"msg.i = global.count ?","property":"i","propertyType":"msg","rules":[{"t":"eq","v":"count","vt":"global"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":520,"y":360,"wires":[["6d3c581.f0c04a8"],["6d420ea5.2cb2c"]]},{"id":"6d420ea5.2cb2c","type":"change","z":"253f62e9.8c881e","name":"i++","rules":[{"t":"set","p":"i","pt":"msg","to":"$.i + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":300,"wires":[["36599409.788abc","c349acc5.5986d"]]},{"id":"13e0fbb5.197cc4","type":"debug","z":"253f62e9.8c881e","name":"Failed to send file!","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":420,"wires":[]},{"id":"6d3c581.f0c04a8","type":"change","z":"253f62e9.8c881e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Failed to send file!","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":420,"wires":[["13e0fbb5.197cc4"]]},{"id":"c349acc5.5986d","type":"debug","z":"253f62e9.8c881e","name":"i","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"i","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":300,"wires":[]},{"id":"5c57a739.a7bd48","type":"ftp","z":"","host":"localhost","port":"21","secureOptions":"","user":"admin","connTimeout":"","pasvTimeout":"","keepalive":""}]
In this case, what should I do?
Any hint will be great.
Thanks!