is caught because of a BlockManager problem induced by an interruption,
print a warning message and quit without saving the last checkpoint.
# Stop the thread before doing anything else
self._stop_checkpointer.set()
self._checkpointer.join()
- # Commit all pending blocks & one last _update()
- self._local_collection.manifest_text()
- self._update(final=True)
- if save_collection:
- self.save_collection()
+ try:
+ # Commit all pending blocks & one last _update()
+ self._local_collection.manifest_text()
+ self._update(final=True)
+ if save_collection:
+ self.save_collection()
+ except AttributeError:
+ # Exception caught in inconsistent state, finish as is.
+ self.logger.warning("Couldn't save last checkpoint while exiting.")
if self.use_cache:
self._cache_file.close()