bin/drbqs-node in drbqs-0.0.12 vs bin/drbqs-node in drbqs-0.0.13
- old
+ new
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
require 'drbqs'
require 'optparse'
-Version = '0.0.12'
+Version = DRbQS::VERSION
help_message =<<HELP
Usage: #{File.basename(__FILE__)} [<uri>] [<process_number>] [options ...]
Start DRbQS nodes connecting to <uri>.
@@ -85,21 +85,8 @@
if /\/$/ =~ options[:log_prefix]
options[:log_prefix] += 'out'
end
end
-process_num.times do |i|
- fork do
- if options[:log_prefix]
- logfile = FileName.create(options[:log_prefix], :position => :suffix, :type => :time,
- :add => :always, :directory => :parent,
- :format => lambda { |t| t.strftime("%Y%m%d_%H%M_#{Process.pid}.log") })
- else
- logfile = STDOUT
- end
- client = DRbQS::Client.new(uri, :log_level => options[:log_level], :log_file => logfile)
- client.connect
- client.calculate
- end
-end
-
-Process.waitall
+exec_node = DRbQS::ExecuteNode.new(uri, options[:log_prefix], options[:log_level])
+exec_node.execute(process_num)
+exec_node.wait