Try usingkey = MiddleMan.new_worker(:worker => :transfer_worker, :worker_key =>
random_key)sleep 0.3 #hack if you're running OS
XMiddleMan.worker(:transfer_worker, key).method(:arg => args)Then use
MiddleMan.worker(:transfer_worker, key).ask_result> From: [EMAIL PROTECTED]>
To: [email protected]> Date: Wed, 17 Sep 2008 15:04:57 -0400>
Subject: [Backgroundrb-devel] ask_result usage> > > I am new to Backgroundrb
and am struggling to get a progress bar > working on a long running job. I
have it setup with memcache which is > working. The code works when I check
status using> >
MiddleMan.worker(:transfer_worker).ask_result(:percent_complete)> > However,
things get messed up when I run a second instance of this > task and
percent_complete is still 100% from the last run.> > So, I assume I need the
ask_result version that uses the job_key so > that I am looking at a separate
instance from the cache. I tried> > result = MiddleMan.ask_result(:worker
> => :tr
ansfer_worker, :job_key => job_key)> result[:percent_complete]> > which
is similar to how ask_status was used in the Advanced Rails > Recipes book,
but this gives> > undefined method `ask_result' for
#<BackgrounDRb::ClusterConnection: > 0x1f496a0>> > Any hints as to what I am
screwing up? Thanks!> > > Mark Lynn> Sabado Technologies> [EMAIL PROTECTED]> >
> > > _______________________________________________> Backgroundrb-devel
mailing list> [email protected]>
http://rubyforge.org/mailman/listinfo/backgroundrb-devel
_________________________________________________________________
Start het nieuwe schooljaar sterk en voordelig!
http://www.startsterk.be
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel