1 Jul 2010 01:40
drb problem? ringy-dingy won't answer...
koicat <patrick.m.neve <at> gmail.com>
2010-06-30 23:40:07 GMT
2010-06-30 23:40:07 GMT
The following code works fine as long as I don't try to run it through
the distributed server. It doesn't get there...
It runs fine out of delayed_job, runs fine if called directly.
But if 'distrib' is true (the default) it runs right up to the call to
the server and right past it without getting to the server or raising
any errors.
Am using Ruby 1.8.6.26 , Ringy-Dingy 1.2.1, dj 1.8.4.
*********The server:
require 'rinda/ring'
class ScriptServer
include DRbUndumped
attr_accessor :result
def run(fullScript)
myTS = Time.now.strftime("%Y%m%d%H%M%S")
msg = "===> Starting #{scriptname} in run #{scriptrun} on
#{scriptenv} at #{myTS}"
puts msg
<at> result = "***#{scriptname} Launched [#{scriptlaunch}]"
rslt = fullScript.run
<at> result << rslt
msg = "#{scriptname} Completed [#{Time.now.strftime("%Y%m%d%H%M
%S")}]"
<at> result << "***#{msg}"
rescue
<at> result << "#{scriptname} Aborted [#{Time.now.strftime("%Y%m%d%H%M
%S")}] \n #{$!} \n #{caller.to_yaml}"
ensure
return <at> result
(Continue reading)
RSS Feed