Skip to content

Commit

Permalink
Merge pull request #79 from buildbot/githubRetry
Browse files Browse the repository at this point in the history
GitHub retry
  • Loading branch information
tardyp authored Jan 6, 2018
2 parents 691dc57 + 35064e9 commit 433be92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buildbot_travis/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def saveConfig(self, request):
if cfg != self._cfg:
try:
err = yield self.saveCfg(cfg)
except Exception as e: # noqa
except Exception as e: # noqa
err = [repr(e)]
if err is not None:
self._in_progress = False
Expand Down
8 changes: 5 additions & 3 deletions buildbot_travis/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
from __future__ import print_function
from future.moves.urllib.parse import urlparse

from buildbot.plugins import changes, util
from buildbot.plugins import changes
from buildbot.steps.source.git import Git

from .base import PollerMixin, VCSBase, getCodebaseForRepository
from .base import PollerMixin, VCSBase


class ParsedGitUrl(object):
Expand All @@ -46,6 +46,7 @@ class GitBase(VCSBase):
method = "clone"
mode = "incremental"
retryFetch = True
retry = (2, 10) # default retry 10 times, with 2 seconds delay

def addRepository(self, factory, project=None, repository=None, branches=None, **kwargs):
kwargs.update(dict(
Expand All @@ -57,7 +58,8 @@ def addRepository(self, factory, project=None, repository=None, branches=None, *
shallow=self.shallow,
mode=self.mode,
method=self.method,
retryFetch=self.retryFetch
retryFetch=self.retryFetch,
retry=self.retry
))

factory.addStep(self.GitStep(**kwargs))
Expand Down

0 comments on commit 433be92

Please sign in to comment.