overload catch_up so that exceptions are raised
authorThomasV <thomasv@gitorious>
Mon, 4 Jun 2012 19:34:15 +0000 (23:34 +0400)
committerThomasV <thomasv@gitorious>
Mon, 4 Jun 2012 19:34:15 +0000 (23:34 +0400)
backends/abe/__init__.py

index a9d90fa..07a0bf2 100644 (file)
@@ -373,6 +373,19 @@ class AbeStore(Datastore_class):
         return block_number
 
 
+    def catch_up(store):
+        # if there is an exception, do rollback and then re-raise the exception
+        for dircfg in store.datadirs:
+            try:
+                store.catch_up_dir(dircfg)
+            except Exception, e:
+                store.log.exception("Failed to catch up %s", dircfg)
+                store.rollback()
+                raise e
+
+
+
+
 from processor import Processor
 
 class BlockchainProcessor(Processor):