[Backgroundrb-devel] Quirks and such within bdrb ...
hemant
gethemant at gmail.com
Tue Mar 4 11:03:29 EST 2008
On Tue, Mar 4, 2008 at 7:15 PM, Tiffani Ashley Bell
<tiffani2k3 at gmail.com> wrote:
> Heyy everybody,
>
> So far, in reading about bdrb, I've found it to be just what I'm looking for
> much like other developers. But, there are a few things I'm rather unclear
> on and I figure folks on this last can clear things up.
>
> So, I have the XMPP4R library that I'm tinkering around with and I've
> created the following worker:
>
> http://pastie.caboo.se/161129
>
> I originally had problems with getting this code to run properly, but I
> finally resolved those thanks to some previous posts on the list. But, I'm
> still running into a few issues here. First, why does it seem as if you
> can't access the arguments that are passed into the worker via the create
> method when it's indeed loaded for the first time? I either get that I'm
> trying to access a nil or something else that prevents me from accessing the
> arguments I passed to new_worker. Or am I correlating the two wrongly
> (create and new_worker)?
>
> Secondly, in my connect_to_jabber method, I attempt to do things like create
> a connection to Jabber and such. Everything works fine outside of bdrb. In
> this case, I'm only wondering what the tasks you call on workers are
> actually supposed to return and is the code I'm writing somehow preventing
> these from working properly even though it works outside of bdrb? Here's
> just one line of what I was attempting to do earlier:
>
> def connect_to_jabber(login_info=args)
> jid = JID.new(login_info)
> return "All done!"
> end
>
> When I run this code, *without* the first line, it does just fine.
> Otherwise, bdrb just kinda sits there. What am I doing wrong?
>
> Here's what I'm doing in the controller, too, btw:
>
> http://pastie.caboo.se/161138
>
> TIA for any help/pointers,
Okay, did you read the docs at:
http://backgroundrb.rubyforge.org
thouroughly? Also send_request geenrally blocks until backgroundrb
server returns some data back to rails.
More information about the Backgroundrb-devel
mailing list