[Backgroundrb-devel] How does ask_result() work?

Cédric akyrho at gmail.com
Thu Jul 24 08:13:01 EDT 2008


Thank you Kieran, i tried out your solution, but it did not work for me.

I wonder if my syntax is right, could you copy/paste me a piece of your code
or explain me how to call worker responses correctly? I still retrieve a
"nil" answer :(

Thanks

On Thu, Jul 24, 2008 at 12:55 PM, Kieran P <kieran776 at gmail.com> wrote:

> Hello,
>
> I had this same issue not more than 3 days ago. hemant responded with a
> clear and effective solution.
>
> See:
>
> http://rubyforge.org/pipermail/backgroundrb-devel/2008-July/001911.html
> and
> http://rubyforge.org/pipermail/backgroundrb-devel/2008-July/001913.html
>
> (scroll down on that last link, the thread went off the ML, but forward at
> the end)
>
> Hope this helps.
>
> Regards
> Kieran
>
>
> On Thu, Jul 24, 2008 at 9:46 PM, Cédric <akyrho at gmail.com> wrote:
>
>> Hi there,
>>
>> I do not really understand how to use ask_result() method. I've got a
>> thumbnailing process fully managed with backgroundrb, and i would like to
>> notify the sender of the progress.
>>
>> So, in my worker, i register the current status like this :
>>
>> cache['thumbnailing_'+id.to_s] = '0,1,2'
>>
>> And in my controller, i have this as a periodical call :
>>
>> worker_status =
>> MiddleMan.worker(:thumbnailer_worker).ask_result(''thumbnailing_' +
>> params[:id].to_s).split(',')
>>
>> I expect the return value as 0, 1 and 2 but it seems that ask_result() is
>> returning a nil value.
>>
>> Thanks per advance.
>>
>> --
>> Bousmanne Cédric
>>
>


-- 
Bousmanne Cédric

Jabber / XMPP : akyrho at gmail.com
Mail : akyrho at gmail.com
Blog : http://www.parenthese.be/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080724/d0e8c808/attachment.html>


More information about the Backgroundrb-devel mailing list