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].
gitlab-workhorse [OPTIONS]
Options:
-apiCiLongPolling duration
-apiCiLongPolling
Duration
duration
Long polling duration for job requesting for runners (default 0s - disabled)
-apiLimit uint
Number of API requests allowed at single time
...
...
internal/config/config.go
View file @
7f508893
...
...
@@ -28,17 +28,17 @@ type RedisConfig struct {
}
type
Config
struct
{
Redis
*
RedisConfig
`toml:"redis"`
Backend
*
url
.
URL
`toml:"-"`
Version
string
`toml:"-"`
DocumentRoot
string
`toml:"-"`
DevelopmentMode
bool
`toml:"-"`
Socket
string
`toml:"-"`
ProxyHeadersTimeout
time
.
Duration
`toml:"-"`
APILimit
uint
`toml:"-"`
APIQueueLimit
uint
`toml:"-"`
APIQueueTimeout
time
.
Duration
`toml:"-"`
APICILongPolling
time
.
Duration
`toml:"-"`
Redis
*
RedisConfig
`toml:"redis"`
Backend
*
url
.
URL
`toml:"-"`
Version
string
`toml:"-"`
DocumentRoot
string
`toml:"-"`
DevelopmentMode
bool
`toml:"-"`
Socket
string
`toml:"-"`
ProxyHeadersTimeout
time
.
Duration
`toml:"-"`
APILimit
uint
`toml:"-"`
APIQueueLimit
uint
`toml:"-"`
APIQueueTimeout
time
.
Duration
`toml:"-"`
APICILongPolling
Duration
time
.
Duration
`toml:"-"`
}
// LoadConfig from a file
...
...
internal/upstream/routes.go
View file @
7f508893
...
...
@@ -120,7 +120,7 @@ func (u *Upstream) configureRoutes() {
uploadAccelerateProxy
:=
upload
.
Accelerate
(
path
.
Join
(
u
.
DocumentRoot
,
"uploads/tmp"
),
proxy
)
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
{
// Git Clone
...
...
main.go
View file @
7f508893
...
...
@@ -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
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
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
prometheusListenAddr
=
flag
.
String
(
"prometheusListenAddr"
,
""
,
"Prometheus listening address, e.g. ':9100'"
)
...
...
@@ -113,16 +113,16 @@ func main() {
secret
.
SetPath
(
*
secretPath
)
cfg
:=
config
.
Config
{
Backend
:
backendURL
,
Socket
:
*
authSocket
,
Version
:
Version
,
DocumentRoot
:
*
documentRoot
,
DevelopmentMode
:
*
developmentMode
,
ProxyHeadersTimeout
:
*
proxyHeadersTimeout
,
APILimit
:
*
apiLimit
,
APIQueueLimit
:
*
apiQueueLimit
,
APIQueueTimeout
:
*
apiQueueTimeout
,
APICILongPolling
:
*
apiCiLongPolling
,
Backend
:
backendURL
,
Socket
:
*
authSocket
,
Version
:
Version
,
DocumentRoot
:
*
documentRoot
,
DevelopmentMode
:
*
developmentMode
,
ProxyHeadersTimeout
:
*
proxyHeadersTimeout
,
APILimit
:
*
apiLimit
,
APIQueueLimit
:
*
apiQueueLimit
,
APIQueueTimeout
:
*
apiQueueTimeout
,
APICILongPolling
Duration
:
*
apiCiLongPollingDuration
,
}
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