Browse Source

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
Pranesh Pandurangan 4 years ago
parent
commit
c867e3e4bd
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      entropy/engine.py

+ 4
- 1
entropy/engine.py View File

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

Loading…
Cancel
Save