Chromium Code Reviews| Index: pending_manager.py |
| diff --git a/pending_manager.py b/pending_manager.py |
| index 846ff03f3e27f4cd29a412e88e8772f57632a96c..b8c51a09a8ef1deb28404a94ab5aea45fea34c1f 100644 |
| --- a/pending_manager.py |
| +++ b/pending_manager.py |
| @@ -44,7 +44,7 @@ class PendingCommit(base.Verified): |
| persistent = base.Verified.persistent + [ |
| # Important since they tell if we need to revalidate and send try jobs |
| # again or not if any of these value changes. |
| - 'issue', 'patchset', 'rietveld_server', 'processed', 'description', |
| + 'issue', 'patchset', 'rietveld_server', 'description', |
| 'files', |
| # Only a cache, these values can be regenerated. |
| 'owner', 'reviewers', 'base_url', |
| @@ -64,7 +64,6 @@ class PendingCommit(base.Verified): |
| self.description = description |
| self.messages = messages |
| self.revision = None |
| - self.processed = False |
| self.files = [] |
| def patch_url(self): |
| @@ -140,10 +139,9 @@ class PendingManager(object): |
| """Starts verification on newly found pending commits.""" |
| for pending in self.queue.pending_commits[:]: |
| try: |
| - if pending.verifications or pending.processed: |
| + if len(pending.verifications) == len(self.verifiers) or pending.done(): |
|
Dirk Pranke
2011/01/04 22:10:42
Should this check maybe be part of pending.done()
M-A Ruel
2011/01/11 21:07:40
That's a good question.
Since pending doesn't kno
|
| continue |
| logging.info('Processing issue %s' % pending.issue) |
| - pending.processed = True |
| if not self._validity_checks(pending): |
| # Silently ignore. |
| @@ -157,6 +155,8 @@ class PendingManager(object): |
| os.chdir(self.checkout.project_path) |
| for verifier in self.verifiers: |
| verifier.verify(pending, revision) |
| + if pending.done(): |
| + break |
| finally: |
| os.chdir(previous_cwd) |
| except base.DiscardPending, e: |
| @@ -183,7 +183,9 @@ class PendingManager(object): |
| def scan_results(self): |
| """Scans pending commits that can be committed or discarded.""" |
| for pending in self.queue.pending_commits[:]: |
| - if pending.failed(): |
| + if pending.ignored(): |
| + self._discard_pending(pending, None) |
| + elif pending.failed(): |
| self._discard_pending(pending, 'Patch verification failed') |
| elif pending.succeeded(): |
| # The item is removed right away. |