summaryrefslogtreecommitdiff
path: root/monitor/josef_monitor.py
diff options
context:
space:
mode:
authorJosef Gustafsson <josef.gson@gmail.com>2015-10-01 09:15:11 +0200
committerJosef Gustafsson <josef.gson@gmail.com>2015-10-01 09:15:11 +0200
commitb7055a72d40b774f62ea45c26eab746423f615f5 (patch)
tree8e3942bbb33116004708386519073302b4da14a8 /monitor/josef_monitor.py
parent70475f36c542006cdc9fd83b78731441a5861769 (diff)
parent810417bab6138470c2b0dda6e74f6ca5640f8f94 (diff)
Merge branch 'master' of ssh://git.nordu.net/user/josef/catlfish
Diffstat (limited to 'monitor/josef_monitor.py')
-rwxr-xr-xmonitor/josef_monitor.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py
index b130404..f7017fa 100755
--- a/monitor/josef_monitor.py
+++ b/monitor/josef_monitor.py
@@ -73,9 +73,16 @@ class ctlog:
if self.build:
start_size = self.entries
+ # try:
while self.entries < self.sth["tree_size"]:
tmp_size = self.entries
- self.subtree, self.entries = self.fetch_and_increment_subtree(self.entries, self.sth["tree_size"] -1, self.url, self.subtree)
+ try:
+ self.subtree, self.entries = self.fetch_and_increment_subtree(self.entries, self.sth["tree_size"] -1, self.url, self.subtree)
+ except Exception, e:
+ print ERROR_STR + "Failed fetch and increment for " + self.name
+ self.log(ERROR_STR + "Failed fetch and increment tree. Current Size: " + str(self.entries) + " Sth: " + str(self.sth) + " Error: " + str(e))
+ return
+
if tmp_size != self.entries:
self.log("Got entries " + str(tmp_size) + " to " \
+ str(self.entries -1 ) + " of " + str(self.sth["tree_size"]-1))
@@ -85,6 +92,9 @@ class ctlog:
pass
else:
self.log(ERROR_STR + "Failed to verify newly built subtree!")
+ # except Exception, e:
+ # print "Failed incremental build for " + self.name
+ # self.log(ERROR_STR + "Failed incremental build. Error: " + str(e))
def fetch_and_increment_subtree(self, first, last, url, subtree =[[]]):
new_leafs = []