[Backgroundrb-devel] Can I do this, question

Ed W lists at wildgooses.com
Fri Apr 11 16:43:54 EDT 2008


I have a bunch of real uses for BackgroundDrb, but I also a very simple 
need to delay sending an email for about 5 seconds after a rails action 
completes.  Basically I need to leave time for the DB to commit and sync 
to the slaves before the email can be sent

Is BackgroundDb the right tool for this job?  Any other suggestions on 
ways to implement this?  (I have seen suggestions to create a new thread 
and run the mailer from that thread, but it's not clear that 
actionmailer is actually thread safe..?)

I'm thinking just to fire up worker threads which pause for a length of 
time before sending the email - is this likely the best solution?  Any 
other suggestions?

Cheers

Ed W


More information about the Backgroundrb-devel mailing list