bodhi/jobs.py | 7 ++++--- bodhi/model.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-)
New commits: commit 97b1a9d1f9ceecaaa2128837cc5bbd7f8e495f36 Author: Luke Macken lmacken@redhat.com Date: Thu Aug 12 19:18:52 2010 -0400
Calculate the number of days in testing based on the most recent push
diff --git a/bodhi/model.py b/bodhi/model.py index 739851c..a0bd626 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -1021,7 +1021,7 @@ class PackageUpdate(SQLObject): def days_in_testing(self): """ Return the number of days that this update has been in testing """ timestamp = None - for comment in self.comments: + for comment in self.comments[::-1]: if comment.text == 'This update has been pushed to testing': timestamp = comment.timestamp if self.status == 'testing':
commit 74b75e8109970624c0adef01c7851c044cf85c49 Author: Luke Macken lmacken@redhat.com Date: Thu Aug 12 19:16:18 2010 -0400
Revert "Update our approve_testing_updates job to handle updates that have met the"
This reverts commit ada86eae94dd6e8ec1f8470d9ea9da1887870b54.
diff --git a/bodhi/jobs.py b/bodhi/jobs.py index 009851b..125b205 100644 --- a/bodhi/jobs.py +++ b/bodhi/jobs.py @@ -24,7 +24,7 @@ import subprocess from os.path import isdir, realpath, dirname, join, islink, exists from datetime import datetime from turbogears import scheduler, config -from sqlobject.sqlbuilder import AND, OR +from sqlobject.sqlbuilder import AND
from bodhi import mail from bodhi.util import get_age_in_days @@ -131,6 +131,7 @@ def fix_bug_titles(): see if we can re-fetch those bugs. """ from bodhi.model import Bugzilla + from sqlobject.sqlbuilder import OR log.debug("Running fix_bug_titles job") for bug in Bugzilla.select( OR(Bugzilla.q.title == 'Invalid bug number', @@ -174,8 +175,8 @@ def approve_testing_updates(): """ log.info('Running approve_testing_updates job...') for update in PackageUpdate.select( - OR(PackageUpdate.q.status == 'testing', - PackageUpdate.q.status == 'pending')): + AND(PackageUpdate.q.status == 'testing', + PackageUpdate.q.request == None)): # If this release does not have any testing requirements, skip it if not update.release.mandatory_days_in_testing: continue