Displaying 1 result from an estimated 1 matches for "researchesworker".
2007 Feb 22
1
failed to find slave socket - (RuntimeError)
...ches)
MiddleMan.new_worker(:class => :products_worker,:job_key => :products)
sleep(5)
end
I''m using ":job_key", so if a worker hasn''t already ended its work
after five seconds, it''s not duplicated.
The code inside the worker is something like:
class ResearchesWorker < BackgrounDRb::Worker::RailsBase
def do_work(args)
completed = RunningResearch.find(:all,:conditions => ["endtime
< ?",Time.now])
for complete in completed
complete.complete
end
self.delete
end
end
ResearchesWorker.register
After 4 or 5 minutes of working, the wo...