Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
24f0a45b
Commit
24f0a45b
authored
Dec 16, 2016
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do things in the correct order
parent
f6263e2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/ci/runner.rb
app/models/ci/runner.rb
+1
-0
lib/ci/api/builds.rb
lib/ci/api/builds.rb
+2
-1
No files found.
app/models/ci/runner.rb
View file @
24f0a45b
...
...
@@ -132,6 +132,7 @@ module Ci
def
ensure_runner_queue_value
Gitlab
::
Redis
.
with
do
|
redis
|
value
=
Time
.
new
.
inspect
redis
.
set
(
runner_queue_key
,
value
,
ex:
60
.
minutes
,
nx:
true
)
redis
.
get
(
runner_queue_key
)
end
...
...
lib/ci/api/builds.rb
View file @
24f0a45b
...
...
@@ -21,6 +21,8 @@ module Ci
return
build_not_found!
end
new_update
=
current_runner
.
ensure_runner_queue_value
build
=
Ci
::
RegisterBuildService
.
new
.
execute
(
current_runner
)
if
build
...
...
@@ -31,7 +33,6 @@ module Ci
else
Gitlab
::
Metrics
.
add_event
(
:build_not_found
)
new_update
=
current_runner
.
ensure_runner_queue_value
headers
'X-GitLab-Last-Update'
,
new_update
build_not_found!
...
...
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