Module: Capistrano::Configuration::Connections

Module | Capistrano::Configuration::Connections
In: | lib/capistrano/configuration/connections.rb

### Methods

connect! connection_factory establish_connections_to execute_on_servers failed! has_failed? sessions teardown_connections_to

### Public Instance methods

connect!(options={})

Used to force connections to be made to the current task‘s servers. Connections are normally made lazily in Capistrano—you can use this to force them open before performing some operation that might be time-sensitive.

connection_factory()

Returns the object responsible for establishing new SSH connections. The factory will respond to connect_to, which can be used to establish connections to servers defined via ServerDefinition objects.

establish_connections_to(servers)

Ensures that there are active sessions for each server in the list.

execute_on_servers(options={}) {|servers_slice| ...}

Determines the set of servers within the current task‘s scope and establishes connections to them, and then yields that list of servers.

failed!(server)

Indicate that the given server could not be connected to.

has_failed?(server)

Query whether previous connection attempts to the given server have failed.

sessions()

A hash of the SSH sessions that are currently open and available. Because sessions are constructed lazily, this will only contain connections to those servers that have been the targets of one or more executed tasks. Stored on a per-thread basis to improve thread-safety.

teardown_connections_to(servers)

Destroys sessions for each server in the list.

[Validate]