[Swift-commit] r5192 - trunk/bin/grid
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Thu Sep 29 09:50:33 CDT 2011
Author: ketan
Date: 2011-09-29 09:50:32 -0500 (Thu, 29 Sep 2011)
New Revision: 5192
Modified:
trunk/bin/grid/my-swift-workers
Log:
added sites.xml writing code
Modified: trunk/bin/grid/my-swift-workers
===================================================================
--- trunk/bin/grid/my-swift-workers 2011-09-28 21:49:12 UTC (rev 5191)
+++ trunk/bin/grid/my-swift-workers 2011-09-29 14:50:32 UTC (rev 5192)
@@ -1,5 +1,9 @@
#! /usr/bin/env ruby
+$stdout.sync = true
+# FIXME: Is this the best way to get lib functions from bin/grid into RUBYLIB ?
+$:[$:.length] = File.dirname($0)
+
require 'erb'
require 'mk_catalog'
require 'etc'
@@ -113,15 +117,17 @@
numlines = %x{wc -l #{ARGV[0]}}.split.first.to_i
# **Ketan: Remove any worker or service ports file present from the previous runs
+ puts "removing service.sports and service.wports"
system("rm -f service.sports service.wports")
system("start-swift-service #{numlines} &")
-
+
service_ports=[]
worker_ports=[]
-
+
+ puts "sleeping, waiting for all services to start and write their ports"
sleep 40
-
+
sports_file=File.open("service.sports")
sports_file.each_line { |line|
service_ports.push line
@@ -319,7 +325,6 @@
r=50 q=25
=end
-=begin
def dump(file, template, binding)
file_out = File.open(file, "w")
file_out.puts ERB.new(template, 0, "%<>").result(binding)
@@ -328,5 +333,3 @@
dump("coaster_osg.xml", coaster_sites, binding)
-=end
-
More information about the Swift-commit
mailing list