[Backgroundrb-devel] Question about new results hash
ezmobius at gmail.com
Mon Oct 30 16:24:59 EST 2006
On Oct 30, 2006, at 1:15 PM, Joshua Warchol wrote:
> Ezra Zygmuntowicz wrote:
>> I'm not entirely certain what you are asking? Can you clarify a
>> bit please?
> Well, I've got a model that's currently doing the heavy lifting
> populating entries in a few tables for a newsletter. I'm trying to
> make it work with Backgroundrb now. So I've got a
> Newsletter#deliver method that looks for subscribers and then
> populates a notifications queue that another system uses to pump
> out actual emails.
> Calling #deliver from a my PublishWorker is a snap, but I'm looking
> at my options for reporting back its progress. Passing in the
> results hash was my first idea.
>> The rdoc is here: http://backgroundrb.rubyforge.org/
> I had the old README cached, sorry!
Yes the results hash is really just a hash. But if you plan on
getting results throughh the middleman and then passing them into
your model the you should call MiddleMan.worker(session
[:key]).results.to_hash before you pass them around on the rails
side. The whole point of the results hash is to be able to pass
hashes back and forth between rails and your workers. Take a look in
the examples directory for all gthe stuff you need to set up an ajax
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
More information about the Backgroundrb-devel