diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-01-18 17:38:28 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-01-18 17:38:28 +1300 |
commit | d87486e678cd2d957e504109c3665ab84de1a6cc (patch) | |
tree | 11da91c5195e2ce0f996e51aacd58844ad8d0a4b /app/models/clusters/concerns/application_status.rb | |
parent | 8296ff580c2bb1b2a9ee07193f79f66fd6444de0 (diff) | |
download | gitlab-ce-d87486e678cd2d957e504109c3665ab84de1a6cc.tar.gz |
Refactor some methods in Prometheus model
- #update_errored? method def is redundant, already defined from state
machine
- #update_in_progress? moved to ApplicationStatus
- #ready_status becomes a constant. Previously it was extended in ee/ so
maybe that was why it's a instance method
Diffstat (limited to 'app/models/clusters/concerns/application_status.rb')
-rw-r--r-- | app/models/clusters/concerns/application_status.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/clusters/concerns/application_status.rb b/app/models/clusters/concerns/application_status.rb index 0e74cce29b7..a556dd5ad8b 100644 --- a/app/models/clusters/concerns/application_status.rb +++ b/app/models/clusters/concerns/application_status.rb @@ -77,6 +77,10 @@ module Clusters def available? installed? || updated? end + + def update_in_progress? + updating? + end end end end |