Sha256: f640f9abd6e0cea2447ec0c349ee13ec1f1c130fc0c29064da57a72e5e23bf10

Contents?: true

Size: 696 Bytes

Versions: 3

Compression:

Stored size: 696 Bytes

Contents

module Entangler
  module Executor
    module Background
      module Master
        protected
        def start_remote_slave
          require 'open3'
          @remote_writer, @remote_reader, remote_err, @remote_thread = Open3.popen3("ssh -q #{@opts[:remote_user]}@#{@opts[:remote_host]} -p #{@opts[:remote_port]} -C \"source ~/.rvm/environments/default && entangler slave #{@opts[:remote_base_dir]}\"")
          remote_err.close
        end

        def wait_for_threads
          super
          Process.wait @remote_thread[:pid] rescue nil
        end

        def kill_off_threads
          Process.kill("INT", @remote_thread[:pid])
          super
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
entangler-0.2.1 lib/entangler/executor/background/master.rb
entangler-0.2.0 lib/entangler/executor/background/master.rb
entangler-0.1.2 lib/entangler/executor/background/master.rb