From fe24ae0111eccd1724c7a4bf16e95d51cae94ae1 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 27 Oct 2009 14:37:23 +0000 Subject: [PATCH] clean-suites: Fix SQLA usage Signed-off-by: Frank Lichtenheld --- dak/clean_suites.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dak/clean_suites.py b/dak/clean_suites.py index 3bc42294..3513d912 100755 --- a/dak/clean_suites.py +++ b/dak/clean_suites.py @@ -222,7 +222,7 @@ SELECT df.id, s.id, f.filename FROM source s, files f, dsc_files df session.commit() # Delete files from the pool - old_files = session.query(PoolFile).filter(last_used <= delete_date) + old_files = session.query(PoolFile).filter(PoolFile.last_used <= delete_date) if max_delete is not None: old_files = old_files.limit(max_delete) print "Limiting removals to %d" % max_delete @@ -332,7 +332,7 @@ def clean_queue_build(now_date, delete_date, max_delete, session): our_delete_date = now_date - timedelta(seconds = int(cnf["Clean-Suites::QueueBuildStayOfExecution"])) count = 0 - for qf in session.query(QueueBuild).filter(last_used <= our_delete_date): + for qf in session.query(QueueBuild).filter(QueueBuild.last_used <= our_delete_date): if not os.path.exists(qf.filename): utils.warn("%s (from queue_build) doesn't exist." % (qf.filename)) continue -- 2.39.5