Skip to content

Instantly share code, notes, and snippets.

@jodell
Created October 19, 2011 21:47
Show Gist options
  • Save jodell/1299788 to your computer and use it in GitHub Desktop.
Save jodell/1299788 to your computer and use it in GitHub Desktop.
host availability
Timeout::timeout(@timeout) do
sleep 2 while rack_node.refresh && rack_node.status != 'ACTIVE'
sleep 2 while !(TCPSocket.new(rack_node.addresses[:public].first, 22) rescue nil)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment