Commit 0abce36c authored by Matija Čupić's avatar Matija Čupić

Update list of allowed attribute updates in Runner

parent 053b9d21
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment