Increase threshold to a week for slice creation, 2 weeks for suspension.
[monitor.git] / rt.py
diff --git a/rt.py b/rt.py
index 05dce04..0c809b4 100644 (file)
--- a/rt.py
+++ b/rt.py
@@ -8,6 +8,7 @@ import Queue
 import time 
 import comon
 from threading import *
+import config
 
 # RT database access constants file
 RT_DB_CONSTANTS_PATH='/etc/planetlab/rt_db'
@@ -76,8 +77,8 @@ def open_rt_db():
                                user=rt_db_constants['RT_DB_USER'],
                                passwd=rt_db_constants['RT_DB_PASSWORD'],
                                db=rt_db_constants['RT_DB_NAME'])
-       except Error:
-               print "Failed to connect to RT database"
+       except Exception, err:
+               print "Failed to connect to RT database: %s" %err
                return -1
 
        return rt_db
@@ -170,7 +171,7 @@ class RT(Thread):
                                #logger.debug("RT: tickets for %s" %host)
                                self.tickets[host] = tmp
                        else:
-                               logger.debug("RT: no tix for %s - policy" %host)
+                               logger.debug("RT: no tix for %s" %host)
                                self.sickNoTicket.put(host) 
 
        # Removes hosts that are no longer down.