Hi. Posted a general question earlier today. I have a specific
question this time -- hoping someone can help out. I think I'm
probably doing something incorrectly. Here goes:
I have a Worker method that sends a lot of emails. The method looks like this:
def send_participant_reminders(args=nil)
args[:emails].each do |email|
unless email.notified?
Emailer.deliver_survey_reminder(email)
end
end
end
I call that worker from a controller like so:
MiddleMan.new_worker(:worker => :participant_worker)
MiddleMan.ask_work(:worker => :participant_worker,
:worker_method => :send_participant_reminders,
:data => {:emails => @emails})
----------------------------
My emails are being sent, but I'm seeing a new process created *each
time I invoke the code in the controller*. That process starts out at
about 17m of memory then, once all work appears to have been
completed, jumps to about 50m. The process stays around until
"script/backgroundrb stop".
Maybe I've been reading the examples incorrectly?
Any help would be appreciated. Seeing this same problem (I think)
suck up 4G of ram on a production server. yuck.
Thanks again,
clint
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel