Nadal,

You can try this:
http://rubydoc.info/github/capistrano/capistrano/master/Capistrano/Configuration/Servers#find_servers_for_task-instance_method

Two subtle variations, one or the other should suit your needs!

- Lee

On 12 October 2010 04:56, Nadal <[email protected]> wrote:

> Anytime I go to site after cap production deploy, the site taks a
> while to come up. In order to ensure that site is pinged after deploy
> I added following code to ~/deploy/production.rb
>
>
> server 'www.domain.com', :app, :web, :db, :primary => true
> set :branch, "master"
>
> after "deploy", "ensure_alive"
>
> task :ensure_alive do
>  cmd = "curl http://www.domain.com";
>  system(cmd)
> end
>
>
> It works. However I have repeated www.domain.com at the top and also
> in my task "ensure_alive". Is there a way for me to get acces to
> www.domain.com declared at the top inside my task.
>
> Thanks
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected]<capistrano%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to