Class: DeepTest::Distributed::MultiTestServerProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_test/distributed/multi_test_server_proxy.rb

Defined Under Namespace

Classes: WorkerServerProxy

Instance Method Summary collapse

Constructor Details

#initialize(options, slaves) ⇒ MultiTestServerProxy

Returns a new instance of MultiTestServerProxy.



4
5
6
7
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 4

def initialize(options, slaves)
  DeepTest.logger.debug "MultiTestServerProxy#initialize #{slaves.length} slaves"
  @slave_controller = DispatchController.new(options, slaves)
end

Instance Method Details

#spawn_worker_server(options) ⇒ Object



9
10
11
12
13
14
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 9

def spawn_worker_server(options)
  DeepTest.logger.debug "dispatch spawn_worker_server for #{options.origin_hostname}"
  WorkerServerProxy.new options,
                        @slave_controller.dispatch(:spawn_worker_server, 
                                                   options)
end

#sync(options) ⇒ Object



16
17
18
19
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 16

def sync(options)
  DeepTest.logger.debug "dispatch sync for #{options.origin_hostname}"
  @slave_controller.dispatch(:sync, options)
end