Sha256: d5264269763478b4cfd90e03f208248998257604e073db5515ff3d9d53d70e27

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 Bytes

Contents

# magazine_slave_provider.rb
require 'drb'
require 'rinda/ring'
require './rinda_ring_finger_patch' if RUBY_VERSION > '1.9.1'
require 'rinda/tuplespace'
require './magazine_slave'



# pass on

id = ARGV[0].to_i || "?"
app_pwd = ARGV[1]
test_framework_short_name = ARGV[2]

# start up the Rinda service

DRb.start_service

Dir.chdir app_pwd
puts "   -- build slave #{id}..."; $stdout.flush
magazine_slave = MagazineSlave.new(id, test_framework_short_name )

# never expire, the renewer returns nil, which means expiration of *nix clock
renewer = Rinda::SimpleRenewer.new(nil)
Rinda::RingProvider.new(:MagazineSlave, magazine_slave, id, renewer).provide

puts "  --> DRb magazine_slave_service: #{id} provided..."; $stdout.flush

# wait for the DRb service to finish before exiting
DRb.thread.join

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spork-1.0.0rc4 lib/spork/run_strategy/magazine/magazine_slave_provider.rb
spork-1.0.0rc4-x86-mswin32 lib/spork/run_strategy/magazine/magazine_slave_provider.rb
spork-1.0.0rc4-x86-mingw32 lib/spork/run_strategy/magazine/magazine_slave_provider.rb