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:
Diffstat (limited to 'internal/source/gitlab/gitlab.go')
-rw-r--r--internal/source/gitlab/gitlab.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/internal/source/gitlab/gitlab.go b/internal/source/gitlab/gitlab.go
index a295b753..b79b434f 100644
--- a/internal/source/gitlab/gitlab.go
+++ b/internal/source/gitlab/gitlab.go
@@ -7,9 +7,7 @@ import (
"path"
"sort"
"strings"
- "sync"
- "github.com/cenkalti/backoff/v4"
"gitlab.com/gitlab-org/labkit/log"
"gitlab.com/gitlab-org/gitlab-pages/internal/config"
@@ -25,8 +23,6 @@ import (
// information about domains from GitLab instance.
type Gitlab struct {
client api.Resolver
- mu sync.RWMutex
- isReady bool
enableDisk bool
}
@@ -42,8 +38,6 @@ func New(cfg *config.GitLab) (*Gitlab, error) {
enableDisk: cfg.EnableDisk,
}
- go g.poll(backoff.DefaultInitialInterval, maxPollingTime)
-
return g, nil
}
@@ -55,10 +49,6 @@ func (g *Gitlab) GetDomain(ctx context.Context, name string) (*domain.Domain, er
if lookup.Error != nil {
if errors.Is(lookup.Error, client.ErrUnauthorizedAPI) {
log.WithError(lookup.Error).Error("Pages cannot communicate with an instance of the GitLab API. Please sync your gitlab-secrets.json file: https://docs.gitlab.com/ee/administration/pages/#pages-cannot-communicate-with-an-instance-of-the-gitlab-api")
-
- g.mu.Lock()
- g.isReady = false
- g.mu.Unlock()
}
return nil, lookup.Error
@@ -123,8 +113,5 @@ func sortLookupsByPrefixLengthDesc(lookups []api.LookupPath) {
// IsReady returns the value of Gitlab `isReady` which is updated by `Poll`.
func (g *Gitlab) IsReady() bool {
- g.mu.RLock()
- defer g.mu.RUnlock()
-
- return g.isReady
+ return true
}