Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2019-04-26 06:28:49 +0300
committerStan Hu <stanhu@gmail.com>2019-04-30 08:55:12 +0300
commit0a4817dd77eb371f171b634e4df180eafa115721 (patch)
tree9f7caaedef2c3e297e04cf6f2c333950f3d2f0c0 /app/models/clusters/applications/prometheus.rb
parent50fa7847bb89254ab0dbe163b5e71bb43b6d6b14 (diff)
In Prometheus use update! instead of update
In order to not miss any errors since we are not checking the return value of update
Diffstat (limited to 'app/models/clusters/applications/prometheus.rb')
-rw-r--r--app/models/clusters/applications/prometheus.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index 1a715830953..a6b7617b830 100644
--- a/app/models/clusters/applications/prometheus.rb
+++ b/app/models/clusters/applications/prometheus.rb
@@ -21,7 +21,7 @@ module Clusters
state_machine :status do
after_transition any => [:installed] do |application|
application.cluster.projects.each do |project|
- project.find_or_initialize_service('prometheus').update(active: true)
+ project.find_or_initialize_service('prometheus').update!(active: true)
end
end
end
@@ -94,7 +94,7 @@ module Clusters
def disable_prometheus_integration
cluster.projects.each do |project|
- project.prometheus_service&.update(active: false)
+ project.prometheus_service&.update!(active: false)
end
end