I have a worker starting that takes a hash as its args:
MiddleMan.new_worker(:class => :parser_worker, :args => {:doc => @doc,
:ip
=> @request.remote_ip})
This works fine for me. Both argument values in the hash are strings. Not
sure if yours are as well. It might be more an issue of passing objects in
the hash.
Simon
_____
From: backgroundrb-devel-bounces at rubyforge.org
[mailto:backgroundrb-devel-bounces at rubyforge.org] On Behalf Of David James
Sent: 14 September 2007 12:48
To: backgroundrb-devel at rubyforge.org
Subject: [Backgroundrb-devel] Can :args only be a string?
Here''s something strange!
the_job_key = MiddleMan.new_worker(
:class => :log_view_to_sf_worker,
:args => "just a string"
)
works fine.
But
the_job_key = MiddleMan.new_worker (
:class => :log_view_to_sf_worker,
:args => {
:landing_page => @landing_page,
:driver => @driver
}
)
does not.
It is as if :args can only be a string, not a hash!
Still exploring this...
-DJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070914/6a13fdc1/attachment.html