Hi,

I actually decided to leverage off of exception notifier to provide similar 
functionality on exceptions for these workers.  It was pretty simple since all 
of the workers are already wrapped in a begin/rescue by the meta_worker server 
class (see around line 307, invoke_user_method).  Ergo, I just alias chained 
the log_exception call and if an email is provided I send a notification there 
instead of logging.  I of course was in a hurry so there's parts I could 
improve on, such as providing more information in the email, and more 
importantly catching exceptions up a level (i.e. by the master_worker), but its 
a good start.

I wrote it as a plugin since I wanted to avoid touching the backgroundrb 
source, but it's probably something worth integrating into the backgroundrb 
core, although my solution does depend on ActionMailer as it sits now.  Any 
interest in that, or should I continue with it as a plugin?

Thanks,
\Peter

_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel

Reply via email to