diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-11-19 12:57:02 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-11-30 02:15:10 +0300 |
commit | 973ff1719c8559a12610ec3d3ffe070d2bb592a9 (patch) | |
tree | 461678cd7fc6249dacbd193aaeea7e3b87c51241 /app.go | |
parent | d28903a32e2bfa8a80547e639e941eac4843034f (diff) |
Move flag definition to main
Add zip config to appConfig
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -21,6 +21,7 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/acme" "gitlab.com/gitlab-org/gitlab-pages/internal/artifact" "gitlab.com/gitlab-org/gitlab-pages/internal/auth" + cfg "gitlab.com/gitlab-org/gitlab-pages/internal/config" "gitlab.com/gitlab-org/gitlab-pages/internal/domain" "gitlab.com/gitlab-org/gitlab-pages/internal/handlers" "gitlab.com/gitlab-org/gitlab-pages/internal/httperrors" @@ -504,6 +505,11 @@ func runApp(config appConfig) { log.WithError(err).Warn("Loading extended MIME database failed") } + cfg.Default.Zip.ExpirationInterval = config.ZipCacheExpiry + cfg.Default.Zip.CleanupInterval = config.ZipCacheCleanup + cfg.Default.Zip.RefreshInterval = config.ZipCacheRefresh + cfg.Default.Zip.OpenTimeout = config.ZipeOpenTimeout + a.Run() } |