Split lock and connection setup
Allow run the pre-connect hook before the first SSH command is executed, but only run the locking in `with_lock` blocks.
This commit is contained in:
@@ -2,12 +2,13 @@ require "active_support/core_ext/enumerable"
|
||||
require "active_support/core_ext/module/delegation"
|
||||
|
||||
class Kamal::Commander
|
||||
attr_accessor :verbosity, :holding_lock
|
||||
attr_accessor :verbosity, :holding_lock, :connected
|
||||
delegate :hosts, :roles, :primary_host, :primary_role, :roles_on, :traefik_hosts, :accessory_hosts, to: :specifics
|
||||
|
||||
def initialize
|
||||
self.verbosity = :info
|
||||
self.holding_lock = false
|
||||
self.connected = false
|
||||
@specifics = nil
|
||||
end
|
||||
|
||||
@@ -137,6 +138,10 @@ class Kamal::Commander
|
||||
self.holding_lock
|
||||
end
|
||||
|
||||
def connected?
|
||||
self.connected
|
||||
end
|
||||
|
||||
private
|
||||
# Lazy setup of SSHKit
|
||||
def configure_sshkit_with(config)
|
||||
|
||||
Reference in New Issue
Block a user