Module: Brancher::AutoCopying

Defined in:
lib/brancher/auto_copying.rb

Defined Under Namespace

Classes: Executor

Instance Method Summary collapse

Instance Method Details

#new_connectionObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/brancher/auto_copying.rb', line 3

def new_connection
  done = false

  begin
    super
  rescue
    raise if done
    raise unless Brancher.config.auto_copy

    executor = Executor.new(spec.config)
    executor.auto_copy
    done = true
    retry
  end
end