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
0abce36c
Commit
0abce36c
authored
Feb 04, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update list of allowed attribute updates in Runner
parent
053b9d21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
app/models/ci/runner.rb
app/models/ci/runner.rb
+11
-3
No files found.
app/models/ci/runner.rb
View file @
0abce36c
...
...
@@ -68,8 +68,8 @@ module Ci
ONLINE_CONTACT_TIMEOUT
.
ago
end
def
contacted_at
cached_attribute
(
:
contacted_at
)
||
read_attribute
(
:contacted_at
)
def
name
cached_attribute
(
:
name
)
||
read_attribute
(
:name
)
end
def
version
...
...
@@ -80,10 +80,18 @@ module Ci
cached_attribute
(
:revision
)
||
read_attribute
(
:revision
)
end
def
platform
cached_attribute
(
:platform
)
||
read_attribute
(
:platform
)
end
def
architecture
cached_attribute
(
:architecture
)
||
read_attribute
(
:architecture
)
end
def
contacted_at
cached_attribute
(
:contacted_at
)
||
read_attribute
(
:contacted_at
)
end
def
set_default_values
self
.
token
=
SecureRandom
.
hex
(
15
)
if
self
.
token
.
blank?
end
...
...
@@ -170,7 +178,7 @@ module Ci
end
def
update_cached_info
(
values
)
values
=
values
.
slice
(
:version
,
:revision
,
:platform
,
:architecture
)
values
=
values
&
.
slice
(
:name
,
:version
,
:revision
,
:platform
,
:architecture
)
||
{}
values
[
:contacted_at
]
=
Time
.
now
cache_attributes
(
values
)
...
...
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