diff options
Diffstat (limited to 'toys/de/derb/de.rb')
-rw-r--r-- | toys/de/derb/de.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/toys/de/derb/de.rb b/toys/de/derb/de.rb new file mode 100644 index 0000000..f0d6a41 --- /dev/null +++ b/toys/de/derb/de.rb @@ -0,0 +1,20 @@ +$:.unshift File.dirname(__FILE__) + +require 'drbssh' # local file + +class De_hosts_thread + def initialize(host) + @remote = DRbObject.new_with_uri("drbssh://_sd/ruby") + + +class De_hosts + def initialize(hosts) + DRb.start_service 'drbssh://' + # create one thread per host + @remotes = [] + + def execute(obj, args, callback_done) + # XXX threaded + @remotes.each do |r| + r.eval("%s(%s)" % [obj.to_str, args.to_str) + end |