Hi
This is not really capistrano related anymore but I thought it
worthwhile to mention for anyone following the thread.

I have tried a number of wget flags:
wget longtct03g:8080/gta/buildInfo.jsp  -O - --connect-timeout=1 --
timeout=1 --tries=60 --wait=1 --waitretry=10 --retry-connrefused

Resolving longtct03g... 10.200.31.17
Connecting to longtct03g|10.200.31.17|:8080... connected.
HTTP request sent, awaiting response... 400 Bad Request
17:20:40 ERROR 400: Bad Request.

However because the tomcat application is not available you will get a
Bad Request on which wget will fail immediatly. I thus still need to
encapsulate the wget in my own loop. I would have loved to simplify my
script but the external loop is still needed.

Regards

On Jan 22, 3:56 pm, Mike Bailey <[email protected]> wrote:
> For 60 retries use:
>
> if wget --tries=60 --wait=1 --connect-timeout=1 --timeout=1 
> --quiethttp://localhost:8080/;then echo 'success'; else echo 'fail'; fi; exit > 0
>
> I don't understand why you suggest not to fail with exit 1. The task
>
> > has failed. The plan is that I want to later on implement rollback
> > logic and then I need the task to fail to trigger the rollback logic.
>
> exiting on anything but 0 halts capistrano.
>
>
>
> > I am also unsure about where you meant me to put the [puts "fail"]
> > statement. Surely it must be in a if statement of some sorts otherwise
> > it would just print fail regardless of whether it worked or not.
>
> Sorry, I'm a bit sleepy. The shell command above is echoing success or fail.
>
> - Mike
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to