Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-07-30 08:46:20 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-08-07 08:12:40 +0300
commitca640f810a5ec21647df1ef17b1ec319405d0001 (patch)
tree90e4bfa80e64639372d1a018dfabc7830b6b7c5a
parent6c401a369e2a94c17c605750fec6dbd9f1c276a5 (diff)
Remove unused code
-rw-r--r--internal/source/gitlab/gitlab_poll.go25
1 files changed, 3 insertions, 22 deletions
diff --git a/internal/source/gitlab/gitlab_poll.go b/internal/source/gitlab/gitlab_poll.go
index 4e79bbf1..4dbc8754 100644
--- a/internal/source/gitlab/gitlab_poll.go
+++ b/internal/source/gitlab/gitlab_poll.go
@@ -20,15 +20,14 @@ func (g *Gitlab) poll(interval, maxElapsedTime time.Duration) {
backOff.InitialInterval = interval
backOff.MaxElapsedTime = maxElapsedTime
- op := func() error {
+ operation := func() error {
log.Info("Checking GitLab internal API availability")
return g.client.Status()
}
- err := backoff.Retry(op, backOff)
+ err := backoff.Retry(operation, backOff)
if err != nil {
- // Handle error.
log.WithError(err).Errorf("Failed to connect to the internal GitLab API after %.2fs", interval.Seconds())
return
}
@@ -36,24 +35,6 @@ func (g *Gitlab) poll(interval, maxElapsedTime time.Duration) {
g.mu.Lock()
g.isReady = true
g.mu.Unlock()
+
log.Info("GitLab internal pages status API connected successfully")
- //
- // var err error
- // for i := 0; i <= retries; i++ {
- // log.Info("polling GitLab internal pages status API")
- // err = g.checker.Status()
- // if err == nil {
- // log.Info("GitLab internal pages status API connected successfully")
- // g.mu.Lock()
- // g.isReady = true
- // g.mu.Unlock()
- //
- // // return as soon as we connect to the API
- // return
- // }
- //
- // time.Sleep(interval)
- // }
- //
- // log.WithError(err).Errorf("polling failed after %d tries every %.2fs", retries+1, interval.Seconds())
}