diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-22 12:10:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-22 12:10:20 +0000 |
commit | 860dab2f5f977c7bf14c13c01e43cae2757264f1 (patch) | |
tree | 58d34903d0158e24f0c5651d19c06810cffa48ab /workhorse | |
parent | 56274bbb7424bcecbd43bd5f884b11a85322044e (diff) | |
download | gitlab-ce-860dab2f5f977c7bf14c13c01e43cae2757264f1.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse')
-rw-r--r-- | workhorse/internal/upstream/upstream.go | 4 | ||||
-rw-r--r-- | workhorse/internal/upstream/upstream_test.go | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/workhorse/internal/upstream/upstream.go b/workhorse/internal/upstream/upstream.go index 6835569dfa8..e57f58d59dd 100644 --- a/workhorse/internal/upstream/upstream.go +++ b/workhorse/internal/upstream/upstream.go @@ -65,7 +65,7 @@ func newUpstream(cfg config.Config, accessLogger *logrus.Logger, routesCallback Config: cfg, accessLogger: accessLogger, // Kind of a feature flag. See https://gitlab.com/groups/gitlab-org/-/epics/5914#note_564974130 - enableGeoProxyFeature: os.Getenv("GEO_SECONDARY_PROXY") != "0", + enableGeoProxyFeature: os.Getenv("GEO_SECONDARY_PROXY") == "1", geoProxyBackend: &url.URL{}, } if up.geoProxyPollSleep == nil { @@ -207,8 +207,8 @@ func (u *upstream) findGeoProxyRoute(cleanedPath string, r *http.Request) *route func (u *upstream) pollGeoProxyAPI() { for { - u.geoProxyPollSleep(geoProxyApiPollingInterval) u.callGeoProxyAPI() + u.geoProxyPollSleep(geoProxyApiPollingInterval) } } diff --git a/workhorse/internal/upstream/upstream_test.go b/workhorse/internal/upstream/upstream_test.go index 4d8efed2b73..53c15bb7e91 100644 --- a/workhorse/internal/upstream/upstream_test.go +++ b/workhorse/internal/upstream/upstream_test.go @@ -310,9 +310,5 @@ func startWorkhorseServer(railsServerURL string, enableGeoProxyFeature bool) (*h } } - // Since the first sleep happens before any API call, this ensures - // we call the API at least once. - waitForNextApiPoll() - return ws, ws.Close, waitForNextApiPoll } |