diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-06-27 20:21:45 -0700 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-06-27 20:21:45 -0700 |
| commit | 62ce69c1c63df818a2a6f1be6cdad33cbe6ef796 (patch) | |
| tree | 9d1076d8b61501eb56abf898f11a56bbc6d18f24 | |
| parent | 8a8c013cd4513b07e936125a23188e7608f40d58 (diff) | |
getting started
| -rw-r--r-- | nova/rpc.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nova/rpc.py b/nova/rpc.py index 2e78a31e7..d4ac19c20 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -45,6 +45,8 @@ from nova import flags from nova import log as logging from nova import utils +from nova.notifier import api as notifier + LOG = logging.getLogger('nova.rpc') @@ -312,6 +314,7 @@ class ConsumerSet(object): if not it: break while True: + ex = None try: it.next() except StopIteration: @@ -319,7 +322,17 @@ class ConsumerSet(object): except greenlet.GreenletExit: running = False break + except exception.NovaException, e: + if not e.notification_level: + ex = e + # We have an exception we can + # tell the Notification system about. + # Pass it on. + except Exception as e: + ex = e + + if ex: LOG.exception(_("Exception while processing consumer")) self.reconnect() # Break to outer loop |
