Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
7f508893
Commit
7f508893
authored
Mar 02, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename -apiCiLongPolling to -apiCiLongPollingDuration
parent
2ff811ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
24 deletions
+24
-24
README.md
README.md
+1
-1
internal/config/config.go
internal/config/config.go
+11
-11
internal/upstream/routes.go
internal/upstream/routes.go
+1
-1
main.go
main.go
+11
-11
No files found.
README.md
View file @
7f508893
...
@@ -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
-apiCiLongPolling
Duration
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
...
...
internal/config/config.go
View file @
7f508893
...
@@ -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:"-"`
APICILongPolling
Duration
time
.
Duration
`toml:"-"`
}
}
// LoadConfig from a file
// LoadConfig from a file
...
...
internal/upstream/routes.go
View file @
7f508893
...
@@ -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
.
APICILongPolling
Duration
)
u
.
Routes
=
[]
routeEntry
{
u
.
Routes
=
[]
routeEntry
{
// Git Clone
// Git Clone
...
...
main.go
View file @
7f508893
...
@@ -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
apiCiLongPolling
Duration
=
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
,
APICILongPolling
Duration
:
*
apiCiLongPollingDuration
,
}
}
if
*
configFile
!=
""
{
if
*
configFile
!=
""
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment