# File lib/deep_test/distributed/remote_worker_server.rb, line 8 def initialize(base_path, workers) @base_path = base_path @workers = workers end
# File lib/deep_test/distributed/remote_worker_server.rb, line 47 def self.running_server_count @warlock.demon_count if @warlock end
# File lib/deep_test/distributed/remote_worker_server.rb, line 55 def self.start(address, base_path, workers, grace_period = MERCY_KILLING_GRACE_PERIOD) innie, outie = IO.pipe warlock.start("RemoteWorkerServer") do innie.close server = new(base_path, workers) DRb.start_service("drubyall://#{address}:0", server) DeepTest.logger.info "RemoteWorkerServer started at #{DRb.uri}" outie.write DRb.uri outie.close server.launch_mercy_killer(grace_period) DRb.thread.join end outie.close uri = innie.gets innie.close DRbObject.new_with_uri(uri) end
# File lib/deep_test/distributed/remote_worker_server.rb, line 13 def launch_mercy_killer(grace_period) Thread.new do sleep grace_period exit(0) unless workers_started? end end
# File lib/deep_test/distributed/remote_worker_server.rb, line 20 def load_files(files) Dir.chdir @base_path resolver = FilenameResolver.new(@base_path) files.each do |file| load resolver.resolve(file) end end
# File lib/deep_test/distributed/remote_worker_server.rb, line 28 def start_all @workers_started = true @workers.start_all end
Generated with the Darkfish Rdoc Generator 2.