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:
parent
b6a1d3d1e1
commit
c867e3e4bd
|
@ -175,7 +175,10 @@ class Engine(object):
|
|||
now = datetime.datetime.now()
|
||||
next_iteration = cron.get_next(datetime.datetime)
|
||||
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):
|
||||
LOG.info("Running serializer for %s at %s", self.name, current_time)
|
||||
|
|
Loading…
Reference in New Issue