| Index: commit-queue/pending_manager.py
|
| ===================================================================
|
| --- commit-queue/pending_manager.py (revision 236787)
|
| +++ commit-queue/pending_manager.py (working copy)
|
| @@ -175,8 +175,17 @@
|
|
|
| Calls _new_pending_commit() on all new review found.
|
| """
|
| - new_issues = self._fetch_pending_issues()
|
| + try:
|
| + new_issues = self.context.rietveld.get_pending_issues()
|
| + except urllib2.URLError as e:
|
| + if 'timed out' in e.reason:
|
| + # Handle timeouts gracefully. Log them and pretend there are no
|
| + # pending issues. We'll retry on the next iteration.
|
| + logging.warn('request to fetch pending issues timed out: %s' % e)
|
| + return
|
|
|
| + raise
|
| +
|
| # If there is an issue in processed_issues that is not in new_issues,
|
| # discard it.
|
| for pending in self.queue.iterate():
|
| @@ -243,21 +252,6 @@
|
| description=issue_data['description'].replace('\r', ''),
|
| messages=issue_data['messages']))
|
|
|
| - def _fetch_pending_issues(self):
|
| - """Returns the list of issue number for reviews on Rietveld with their last
|
| - patchset with commit+ flag set.
|
| - """
|
| - try:
|
| - return self.context.rietveld.get_pending_issues()
|
| - except urllib2.URLError as e:
|
| - if 'timed out' in e.reason:
|
| - # Handle timeouts gracefully. Log them and pretend there are no
|
| - # pending issues. We'll retry on the next iteration.
|
| - logging.warn('request to fetch pending issues timed out: %s' % e)
|
| - return []
|
| -
|
| - raise
|
| -
|
| def process_new_pending_commit(self):
|
| """Starts verification on newly found pending commits."""
|
| expected = set(i.name for i in self.all_verifiers)
|
|
|