[Backgroundrb-devel] Can :args only be a string?

Simon simon.wilkinson at 434wireless.com
Fri Sep 14 12:54:09 EDT 2007

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.





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.


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...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070914/6a13fdc1/attachment.html 

More information about the Backgroundrb-devel mailing list