I am using a block to dynamically generate a list of servers I want to push code to. Occasionally a few of the machines are unreachable, resulting in a "Errno::ETIMEDOUT". This stop the entire deployment process. How do I rescue this and run some custom code using capistrano?
Asked
Active
Viewed 267 times
0
-
Hi Vinoth, interesting question. I took the liberty of sponsoring it on CodersClan. http://www.codersclan.net/ticket/213 – Dror Feb 02 '14 at 12:56
1 Answers
0
You'd have to wrap your server list generator with a try catch block.
begin
# ... Get server list
rescue Errno::ETIMEDOUT
# ... Handle cases when connection times out
end

gmaliar
- 5,294
- 1
- 28
- 36
-
No, it doesn't seem to work. I even tried wrapping the task itself or the commands within the task. Nothing seems to work. – Vinoth Gopi Feb 05 '14 at 07:20