I just installed BackgrounDRb to take care of sending emails to a list
of users and when I try to call the worker, it causes the request to
“freeze” until Mongrel times out.
This is the line that it fails on:
MiddleMan.worker(:invite_worker).send_invite_emails_test(@event.id,
send_to)
The ‘send_to’ parameter is an array of user type (strings) which the
worker will use to filter the list to send the email to. If I remove
this array things work fine. So does this mean I’m limited to
primitive types when I call a worker function?
Here’s the worker code:
def send_invite_emails_test(event_id, send_to)
logger.debug(“Start message…”)
event = Event.find(event_id)
for invite in event.invites
logger.debug("For invite #{invite.id}")
end
end
The various log files that BackgrounDRb don’t seem to be much help
either. If I call ‘logger.debug’ inside a worker, where does the log
message go?
Any thoughts?
Thanks,
Jeremy