[rhmessaging-commits] rhmessaging commits: r3422 - mgmt/trunk/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jun 4 16:37:03 EDT 2009


Author: nunofsantos
Date: 2009-06-04 16:37:02 -0400 (Thu, 04 Jun 2009)
New Revision: 3422

Modified:
   mgmt/trunk/mint/python/mint/expire.py
   mgmt/trunk/mint/python/mint/sql.py
Log:
expire all non-persistent objects after threshold, instead of just timestamping with the deletion time

Modified: mgmt/trunk/mint/python/mint/expire.py
===================================================================
--- mgmt/trunk/mint/python/mint/expire.py	2009-06-04 20:35:18 UTC (rev 3421)
+++ mgmt/trunk/mint/python/mint/expire.py	2009-06-04 20:37:02 UTC (rev 3422)
@@ -23,7 +23,8 @@
 
     for cls in mint.schema.statsClasses:
       self.ops.append(SqlExpire(eval(cls), self.keepCurrStats))
-    self.ops.append(SqlExpire(Job, self.keepCurrStats))
+    for cls in mint.schema.entityClasses:
+      self.ops.append(SqlExpire(eval(cls), self.keepCurrStats))
 
     self.attrs["threshold"] = threshold
 

Modified: mgmt/trunk/mint/python/mint/sql.py
===================================================================
--- mgmt/trunk/mint/python/mint/sql.py	2009-06-04 20:35:18 UTC (rev 3421)
+++ mgmt/trunk/mint/python/mint/sql.py	2009-06-04 20:37:02 UTC (rev 3422)
@@ -160,11 +160,13 @@
       """ % (table)
       if self.keepCurrStats:
         sql += " and id not in (select stats_curr_id from %s)" % (parent_table)
-    elif self.cls is mint.Job:
+    else:
       sql = """
         delete from %s
         where qmf_delete_time < now() - interval '%%(threshold)s seconds'
       """ % (table)
+      if self.cls is not mint.Job:
+        sql += " and qmf_persistent = 'f' "
 
     return sql
 




More information about the rhmessaging-commits mailing list