Commit 7f508893 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Rename -apiCiLongPolling to -apiCiLongPollingDuration

parent 2ff811ed
...@@ -36,7 +36,7 @@ gitlab-workhorse'][brief-history-blog]. ...@@ -36,7 +36,7 @@ gitlab-workhorse'][brief-history-blog].
gitlab-workhorse [OPTIONS] gitlab-workhorse [OPTIONS]
Options: Options:
-apiCiLongPolling duration -apiCiLongPollingDuration duration
Long polling duration for job requesting for runners (default 0s - disabled) Long polling duration for job requesting for runners (default 0s - disabled)
-apiLimit uint -apiLimit uint
Number of API requests allowed at single time Number of API requests allowed at single time
......
...@@ -28,17 +28,17 @@ type RedisConfig struct { ...@@ -28,17 +28,17 @@ type RedisConfig struct {
} }
type Config struct { type Config struct {
Redis *RedisConfig `toml:"redis"` Redis *RedisConfig `toml:"redis"`
Backend *url.URL `toml:"-"` Backend *url.URL `toml:"-"`
Version string `toml:"-"` Version string `toml:"-"`
DocumentRoot string `toml:"-"` DocumentRoot string `toml:"-"`
DevelopmentMode bool `toml:"-"` DevelopmentMode bool `toml:"-"`
Socket string `toml:"-"` Socket string `toml:"-"`
ProxyHeadersTimeout time.Duration `toml:"-"` ProxyHeadersTimeout time.Duration `toml:"-"`
APILimit uint `toml:"-"` APILimit uint `toml:"-"`
APIQueueLimit uint `toml:"-"` APIQueueLimit uint `toml:"-"`
APIQueueTimeout time.Duration `toml:"-"` APIQueueTimeout time.Duration `toml:"-"`
APICILongPolling time.Duration `toml:"-"` APICILongPollingDuration time.Duration `toml:"-"`
} }
// LoadConfig from a file // LoadConfig from a file
......
...@@ -120,7 +120,7 @@ func (u *Upstream) configureRoutes() { ...@@ -120,7 +120,7 @@ func (u *Upstream) configureRoutes() {
uploadAccelerateProxy := upload.Accelerate(path.Join(u.DocumentRoot, "uploads/tmp"), proxy) uploadAccelerateProxy := upload.Accelerate(path.Join(u.DocumentRoot, "uploads/tmp"), proxy)
ciAPIProxyQueue := queueing.QueueRequests(uploadAccelerateProxy, u.APILimit, u.APIQueueLimit, u.APIQueueTimeout) ciAPIProxyQueue := queueing.QueueRequests(uploadAccelerateProxy, u.APILimit, u.APIQueueLimit, u.APIQueueTimeout)
ciAPILongPolling := builds.RegisterHandler(ciAPIProxyQueue, redis.WatchKey, u.APICILongPolling) ciAPILongPolling := builds.RegisterHandler(ciAPIProxyQueue, redis.WatchKey, u.APICILongPollingDuration)
u.Routes = []routeEntry{ u.Routes = []routeEntry{
// Git Clone // Git Clone
......
...@@ -51,7 +51,7 @@ var secretPath = flag.String("secretPath", "./.gitlab_workhorse_secret", "File w ...@@ -51,7 +51,7 @@ var secretPath = flag.String("secretPath", "./.gitlab_workhorse_secret", "File w
var apiLimit = flag.Uint("apiLimit", 0, "Number of API requests allowed at single time") var apiLimit = flag.Uint("apiLimit", 0, "Number of API requests allowed at single time")
var apiQueueLimit = flag.Uint("apiQueueLimit", 0, "Number of API requests allowed to be queued") var apiQueueLimit = flag.Uint("apiQueueLimit", 0, "Number of API requests allowed to be queued")
var apiQueueTimeout = flag.Duration("apiQueueDuration", queueing.DefaultTimeout, "Maximum queueing duration of requests") var apiQueueTimeout = flag.Duration("apiQueueDuration", queueing.DefaultTimeout, "Maximum queueing duration of requests")
var apiCiLongPolling = flag.Duration("apiCiLongPolling", 0, "Long polling duration for job requesting for runners (default 0s - disabled)") var apiCiLongPollingDuration = flag.Duration("apiCiLongPollingDuration", 0, "Long polling duration for job requesting for runners (default 0s - disabled)")
var logFile = flag.String("logFile", "", "Log file to be used") var logFile = flag.String("logFile", "", "Log file to be used")
var prometheusListenAddr = flag.String("prometheusListenAddr", "", "Prometheus listening address, e.g. ':9100'") var prometheusListenAddr = flag.String("prometheusListenAddr", "", "Prometheus listening address, e.g. ':9100'")
...@@ -113,16 +113,16 @@ func main() { ...@@ -113,16 +113,16 @@ func main() {
secret.SetPath(*secretPath) secret.SetPath(*secretPath)
cfg := config.Config{ cfg := config.Config{
Backend: backendURL, Backend: backendURL,
Socket: *authSocket, Socket: *authSocket,
Version: Version, Version: Version,
DocumentRoot: *documentRoot, DocumentRoot: *documentRoot,
DevelopmentMode: *developmentMode, DevelopmentMode: *developmentMode,
ProxyHeadersTimeout: *proxyHeadersTimeout, ProxyHeadersTimeout: *proxyHeadersTimeout,
APILimit: *apiLimit, APILimit: *apiLimit,
APIQueueLimit: *apiQueueLimit, APIQueueLimit: *apiQueueLimit,
APIQueueTimeout: *apiQueueTimeout, APIQueueTimeout: *apiQueueTimeout,
APICILongPolling: *apiCiLongPolling, APICILongPollingDuration: *apiCiLongPollingDuration,
} }
if *configFile != "" { if *configFile != "" {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment