Add some exceptions and logging around serializer

Added a serializer exception to raise if the serializer fails, to
replace the generic Exception we raise now.

Added a logging statement to another exit point to provide some
more information

Change-Id: I20d58ce8d9d943f957f491fdf2c01516d3975870
This commit is contained in:
Pranesh Pandurangan 2014-06-13 12:32:37 -07:00
parent b6a1d3d1e1
commit c867e3e4bd
1 changed files with 4 additions and 1 deletions

View File

@ -175,7 +175,10 @@ class Engine(object):
now = datetime.datetime.now() now = datetime.datetime.now()
next_iteration = cron.get_next(datetime.datetime) next_iteration = cron.get_next(datetime.datetime)
if self._state == states.ENABLED: if self._state == states.ENABLED:
self.run_serializer(next_iteration, now) try:
self.run_serializer(next_iteration, now)
except exceptions.SerializerException:
LOG.exception("Could not run serializer")
def run_serializer(self, next_iteration, current_time): def run_serializer(self, next_iteration, current_time):
LOG.info("Running serializer for %s at %s", self.name, current_time) LOG.info("Running serializer for %s at %s", self.name, current_time)