enable monitor in plc-config
[monitor.git] / monitor / database / info / interface.py
index 29b19be..0692ede 100644 (file)
@@ -1,4 +1,3 @@
-import bootman                 # debug nodes
 
 from monitor import reboot
 from monitor.common import *
@@ -128,11 +127,12 @@ class SiteInterface(HistorySiteRecord):
 
                        if viart:
                                self.getTicketStatus()          # get current message status
+                               if self.db.message_status not in ['open', 'new']:
+                                       self.closeTicket()
 
                        m = Message(message[0] % args, message[1] % args, viart, self.db.message_id)
 
                        contacts = self.getContacts()
-                       contacts = [config.cc_email]    # TODO: remove after testing...
 
                        print "sending message: %s to site %s for host %s" % (type, self.db.loginbase, hostname)
 
@@ -162,6 +162,7 @@ class SiteInterface(HistorySiteRecord):
                self.db.message_status = "new"
 
        def runBootManager(self, hostname):
+               from monitor import bootman
                print "attempting BM reboot of %s" % hostname
                ret = ""
                try: