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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Feb 16 14:03:14 EST 2009


Author: justi9
Date: 2009-02-16 14:03:14 -0500 (Mon, 16 Feb 2009)
New Revision: 3120

Modified:
   mgmt/trunk/mint/python/mint/sql.py
Log:
Expire jobs based on delete time, not update time

Modified: mgmt/trunk/mint/python/mint/sql.py
===================================================================
--- mgmt/trunk/mint/python/mint/sql.py	2009-02-16 09:20:11 UTC (rev 3119)
+++ mgmt/trunk/mint/python/mint/sql.py	2009-02-16 19:03:14 UTC (rev 3120)
@@ -151,6 +151,7 @@
 
   def generate(self):
     table = self.cls.sqlmeta.table
+
     if table.endswith("_stats"):
       parent_table = table[0:table.find("_stats")]
       sql = """
@@ -159,11 +160,12 @@
       """ % (table)
       if self.keepCurrStats:
         sql += " and id not in (select stats_curr_id from %s)" % (parent_table)
-    else:
+    elif self.cls is mint.Job:
       sql = """
-        delete from %s 
-        where qmf_create_time < now() - interval '%%(threshold)s seconds'
+        delete from %s
+        where qmf_delete_time < now() - interval '%%(threshold)s seconds'
       """ % (table)
+
     return sql
 
 class SqlGetBrokerRegistration(SqlOperation):




More information about the rhmessaging-commits mailing list