X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=monitor%2Fmodel.py;h=5d0fc0579bdcf707bb8be3bd087b8ddd83eeeb1e;hb=5c41a475f7d198274e46f2c5e6f033f06794288b;hp=d06edae7597372f9005da126c7d4361e7fc37918;hpb=ac1e9bb99f3acb754054737870093606d56030a1;p=monitor.git diff --git a/monitor/model.py b/monitor/model.py index d06edae..5d0fc05 100755 --- a/monitor/model.py +++ b/monitor/model.py @@ -2,7 +2,7 @@ from monitor import database -from monitor.wrapper import plc, plccache +from monitor.wrapper import plc from monitor.wrapper import mailer import time @@ -413,6 +413,7 @@ class Target: class Record(object): def __init__(self, hostname, data): + from monitor.wrapper import plccache self.hostname = hostname self.data = data self.plcdb_hn2lb = plccache.plcdb_hn2lb @@ -527,6 +528,8 @@ class Record(object): else: print "takeAction: increasing penalty for %s"%self.hostname pp.increase() + + print "takeAction: applying penalty to %s as index %s"% (self.hostname, index) pp.index = index pp.apply(self.hostname) pp.save() @@ -580,7 +583,7 @@ class Record(object): contacts += plc.getTechEmails(self.loginbase) if PI & roles: #contacts += [PIEMAIL % self.loginbase] - contacts += plc.getSliceUserEmails(self.loginbase) + contacts += plc.getPIEmails(self.loginbase) if USER & roles: contacts += plc.getSliceUserEmails(self.loginbase) slices = plc.slices(self.loginbase)