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
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-ce
Commits
71dc5dbb
Commit
71dc5dbb
authored
Jun 07, 2018
by
Alexis Reigel
Committed by
Winnie Hellmann
Aug 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dry up available scopes to constants
(cherry picked from commit
bbc305b1
)
parent
c9a23fd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
app/models/ci/runner.rb
app/models/ci/runner.rb
+3
-1
lib/api/runners.rb
lib/api/runners.rb
+3
-3
No files found.
app/models/ci/runner.rb
View file @
71dc5dbb
...
...
@@ -12,7 +12,9 @@ module Ci
RUNNER_QUEUE_EXPIRY_TIME
=
60
.
minutes
ONLINE_CONTACT_TIMEOUT
=
1
.
hour
UPDATE_DB_RUNNER_INFO_EVERY
=
40
.
minutes
AVAILABLE_SCOPES
=
%w[specific shared active paused online]
.
freeze
AVAILABLE_TYPES
=
%w[specific shared]
.
freeze
AVAILABLE_STATUSES
=
%w[active paused online offline]
.
freeze
AVAILABLE_SCOPES
=
(
AVAILABLE_TYPES
+
AVAILABLE_STATUSES
).
freeze
FORM_EDITABLE
=
%i[description tag_list active run_untagged locked access_level maximum_timeout_human_readable]
.
freeze
ignore_column
:is_shared
...
...
lib/api/runners.rb
View file @
71dc5dbb
...
...
@@ -9,7 +9,7 @@ module API
success
Entities
::
Runner
end
params
do
optional
:scope
,
type:
String
,
values:
%w[active paused online offline]
,
optional
:scope
,
type:
String
,
values:
Ci
::
Runner
::
AVAILABLE_STATUSES
,
desc:
'The scope of specific runners to show'
use
:pagination
end
...
...
@@ -22,7 +22,7 @@ module API
success
Entities
::
Runner
end
params
do
optional
:scope
,
type:
String
,
values:
%w[active paused online offline specific shared]
,
optional
:scope
,
type:
String
,
values:
Ci
::
Runner
::
AVAILABLE_SCOPES
,
desc:
'The scope of specific runners to show'
use
:pagination
end
...
...
@@ -114,7 +114,7 @@ module API
success
Entities
::
Runner
end
params
do
optional
:scope
,
type:
String
,
values:
%w[active paused online offline specific shared]
,
optional
:scope
,
type:
String
,
values:
Ci
::
Runner
::
AVAILABLE_SCOPES
,
desc:
'The scope of specific runners to show'
use
:pagination
end
...
...
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