Is there a convention for handling exceptions within BackgrounDRb workers?
For example, I have a worker which does some asynchronous data processing
(*not* a scheduled worker) based on some things in the database. However,
if an exception is raised within that worker, then the process for that
worker is killed off. Ideally I would want that worker to just silently
fail and be optimistic that it was an edge case that won't happen every time
the worker is invoked.
As of now, I've just added some basic exception handling to log the error
for future inspection like so:
class EmailWorker < BackgrounDRb::MetaWorker
set_worker_name :email_worker
def run(data = nil)
do_stuff
rescue Exception => ex
logger.info ex
end
end
Is this generally the practice for doing exception handling within workers
or is there another approach?
Regards,
Aaron
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel