Jonathan Donaldson
2009-Jan-07 15:45 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
Sorry if this hit twice, my mailer was using the .com version of my email address not the .net one I signed up with: Using Backgroundrb pulled from github yesterday, and rails 2.2.2. In my worker, I send lots of progress back as I step through the tasks, ie: @items.each do |itm| ...stuff happens here @results[:created_items] += 1 cache[some_key] = @results end in next loop: @ results[:errors] = "Error on Item 4", cache[some_key] = @results when I call ask_result on the worker, I get nil back until after the worker is completely done, then I get my results.... ideas? This is to drive a progress bar and other ''realtime'' feedback... Thanks! Jonathan Thanks! Jonathan Donaldson Partner, Column3 LLC. jonathan at column3.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20090107/a1c618f6/attachment.html>
hemant
2009-Jan-07 16:02 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
On Wed, Jan 7, 2009 at 9:15 PM, Jonathan Donaldson <jonathan at column3.net> wrote:> Sorry if this hit twice, my mailer was using the .com version of my email > address not the .net one I signed up with: > > > Using Backgroundrb pulled from github yesterday, and rails 2.2.2. > In my worker, I send lots of progress back as I step through the tasks, ie: > > @items.each do |itm| > ...stuff happens here > @results[:created_items] += 1 > cache[some_key] = @results > end > in next loop: > @ results[:errors] = "Error on Item 4", > cache[some_key] = @results > > when I call ask_result on the worker, I get nil back until after the worker > is completely done, then I get my results.... > > ideas? This is to drive a progress bar and other ''realtime'' feedback...You will have to use Memcache based backend of result storage for "realtime" feedback. Inbuilt cache behavior is like what you mentioned. For more info: http://backgroundrb.rubyforge.org/workers/#result_caching
Jonathan Donaldson
2009-Jan-07 16:07 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
I am using memcache, with my backgroundrb.yml set like: --- :backgroundrb: :port: 11006 :ip: 127.0.0.1 :result_storage: memcache :memcache: "127.0.0.1:11211" Is there something I need to do in the worker to get it to use it? I see the same behavior with both... On Jan 7, 2009, at 11:02 AM, hemant wrote:> On Wed, Jan 7, 2009 at 9:15 PM, Jonathan Donaldson <jonathan at column3.net > > wrote: >> Sorry if this hit twice, my mailer was using the .com version of my >> email >> address not the .net one I signed up with: >> >> >> Using Backgroundrb pulled from github yesterday, and rails 2.2.2. >> In my worker, I send lots of progress back as I step through the >> tasks, ie: >> >> @items.each do |itm| >> ...stuff happens here >> @results[:created_items] += 1 >> cache[some_key] = @results >> end >> in next loop: >> @ results[:errors] = "Error on Item 4", >> cache[some_key] = @results >> >> when I call ask_result on the worker, I get nil back until after >> the worker >> is completely done, then I get my results.... >> >> ideas? This is to drive a progress bar and other ''realtime'' >> feedback... > > You will have to use Memcache based backend of result storage for > "realtime" feedback. Inbuilt cache behavior is like what you > mentioned. > For more info: > > http://backgroundrb.rubyforge.org/workers/#result_cachingThanks! Jonathan Donaldson Partner, Column3 LLC. jonathan at column3.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20090107/f646e0e3/attachment.html>
hemant
2009-Jan-07 16:52 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
In that case, it would be a bug. I am looking into it, in the meanwhile please file a bug report. On Wed, Jan 7, 2009 at 9:37 PM, Jonathan Donaldson <jonathan at column3.net> wrote:> I am using memcache, with my backgroundrb.yml set like: > --- > :backgroundrb: > :port: 11006 > :ip: 127.0.0.1 > :result_storage: memcache > :memcache: "127.0.0.1:11211" > Is there something I need to do in the worker to get it to use it? I see the > same behavior with both... > > On Jan 7, 2009, at 11:02 AM, hemant wrote: > > On Wed, Jan 7, 2009 at 9:15 PM, Jonathan Donaldson <jonathan at column3.net> > wrote: > > Sorry if this hit twice, my mailer was using the .com version of my email > > address not the .net one I signed up with: > > > Using Backgroundrb pulled from github yesterday, and rails 2.2.2. > > In my worker, I send lots of progress back as I step through the tasks, ie: > > @items.each do |itm| > > ...stuff happens here > > @results[:created_items] += 1 > > cache[some_key] = @results > > end > > in next loop: > > @ results[:errors] = "Error on Item 4", > > cache[some_key] = @results > > when I call ask_result on the worker, I get nil back until after the worker > > is completely done, then I get my results.... > > ideas? This is to drive a progress bar and other ''realtime'' feedback... > > You will have to use Memcache based backend of result storage for > "realtime" feedback. Inbuilt cache behavior is like what you > mentioned. > For more info: > > http://backgroundrb.rubyforge.org/workers/#result_caching > > > > > Thanks! > Jonathan Donaldson > Partner, Column3 LLC. > jonathan at column3.com > > > >-- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org
Cameron Westland
2009-Jan-07 17:58 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
On 7-Jan-09, at 11:52 AM, hemant wrote:> In that case, it would be a bug. I am looking into it, in the > meanwhile please file a bug report.I am having the exact same issue. Where are bug reports filed? Cameron Big Bang Technology Inc. http://www.bigbangtechnology.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20090107/0d036f23/attachment.html>
hemant
2009-Jan-07 17:59 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
On Wed, Jan 7, 2009 at 11:28 PM, Cameron Westland <cameron at bigbangtechnology.com> wrote:> > On 7-Jan-09, at 11:52 AM, hemant wrote: > > In that case, it would be a bug. I am looking into it, in the > meanwhile please file a bug report. > > I am having the exact same issue. > Where are bug reports filed?http://backgroundrb.devjavu.com/report/
Cameron Westland
2009-Jan-07 18:34 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
On 7-Jan-09, at 12:59 PM, hemant wrote:> http://backgroundrb.devjavu.com/report/I filed a bug: http://backgroundrb.devjavu.com/ticket/106 Hopefully this is an easy fix. Let me know what I can do to help. Cameron Big Bang Technology Inc. http://www.bigbangtechnology.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20090107/01544cc8/attachment-0001.html>
Jonathan Donaldson
2009-Jan-07 20:03 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
Hemant, My deep apologies, it appears that this is working as expected, I apparently read the documentation on the wiki incorrectly. I set up a very basic test app and ran through your examples, and everything worked. I then went back into my code and made some minor change (not sure if I can figure out what it was ;-) ), and all is working now..... Please mark my bug under the ''dumb submission'' tag... It would be great if the documentation was a bit clearer, maybe do a O''Reilly quick look or something so you can get paid for the documentation effort.... On Jan 7, 2009, at 11:52 AM, hemant wrote:> In that case, it would be a bug. I am looking into it, in the > meanwhile please file a bug report. > > > > On Wed, Jan 7, 2009 at 9:37 PM, Jonathan Donaldson <jonathan at column3.net > > wrote: >> I am using memcache, with my backgroundrb.yml set like: >> --- >> :backgroundrb: >> :port: 11006 >> :ip: 127.0.0.1 >> :result_storage: memcache >> :memcache: "127.0.0.1:11211" >> Is there something I need to do in the worker to get it to use it? >> I see the >> same behavior with both... >> >> On Jan 7, 2009, at 11:02 AM, hemant wrote: >> >> On Wed, Jan 7, 2009 at 9:15 PM, Jonathan Donaldson <jonathan at column3.net >> > >> wrote: >> >> Sorry if this hit twice, my mailer was using the .com version of my >> email >> >> address not the .net one I signed up with: >> >> >> Using Backgroundrb pulled from github yesterday, and rails 2.2.2. >> >> In my worker, I send lots of progress back as I step through the >> tasks, ie: >> >> @items.each do |itm| >> >> ...stuff happens here >> >> @results[:created_items] += 1 >> >> cache[some_key] = @results >> >> end >> >> in next loop: >> >> @ results[:errors] = "Error on Item 4", >> >> cache[some_key] = @results >> >> when I call ask_result on the worker, I get nil back until after >> the worker >> >> is completely done, then I get my results.... >> >> ideas? This is to drive a progress bar and other ''realtime'' >> feedback... >> >> You will have to use Memcache based backend of result storage for >> "realtime" feedback. Inbuilt cache behavior is like what you >> mentioned. >> For more info: >> >> http://backgroundrb.rubyforge.org/workers/#result_caching >> >> >> >> >> Thanks! >> Jonathan Donaldson >> Partner, Column3 LLC. >> jonathan at column3.com >> >> >> >> > > > > -- > Let them talk of their oriental summer climes of everlasting > conservatories; give me the privilege of making my own summer with my > own coals. > > http://gnufied.orgThanks! Jonathan Donaldson Partner, Column3 LLC. jonathan at column3.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20090107/a23f05ca/attachment.html>
hemant
2009-Jan-07 20:17 UTC
[Backgroundrb-devel] Results from worker are not available until after worker is completed
On Thu, Jan 8, 2009 at 1:33 AM, Jonathan Donaldson <jonathan at column3.net> wrote:> Hemant, > My deep apologies, it appears that this is working as expected, I apparently > read the documentation on the wiki incorrectly. I set up a very basic test > app and ran through your examples, and everything worked. I then went back > into my code and made some minor change (not sure if I can figure out what > it was ;-) ), and all is working now..... > Please mark my bug under the ''dumb submission'' tag...Cool. No problems. Also a note to Cameron, can you take a hard look at your app and make sure its correctly coded? Because two bug reports are related.> > It would be great if the documentation was a bit clearer, maybe do a > O''Reilly quick look or something so you can get paid for the documentation > effort....Actually, all my efforts to get donation for my work on bdrb went in vain. So, yes I can be motivated a bit more if donations came by, otherwise we are fine and dandy.