Backgroundrb not detaching


I have a loop:"#{RAILS_ROOT}/public/images/vehicles/uploaded/
#{}").each do |image|
if image =~ /.*.jpg$/i
@vehicle_image =
@vehicle.vehicle_images << @vehicle_image
#{}/#{image}", “#{RAILS_ROOT}/public/images/vehicles/
MiddleMan.new_worker(:class => :resizeimage_worker, :args =>
{:id =>, :basepath => “#{RAILS_ROOT}/public/images/

It appears to be waiting for MiddleMan.new_worker to return before
continuing to the next iteration.
Im sure I must be doing something wrong here - as this would defeat
the whole point of backgroundrb?

Any thoughts?

Kind Regards,

Matt Williams

may be of help to you.

Roderick van Domburg


Thank you kindly for the quick reply.

It turns out I spawning new workers for each image, each of which
consumed crazy amounts of resources and gave the illusion of blocking
as the system was running so slow


heh…that would do it! :stuck_out_tongue:

On 7/15/07, Matt removed_email_address@domain.invalid wrote:

seth at subimage interactive

Cashboard - Estimates, invoices, and time tracking software - for free!

Substruct - Open source RoR e-commerce software.