diff options
Diffstat (limited to 'app/services/projects/prometheus/metrics/update_service.rb')
-rw-r--r-- | app/services/projects/prometheus/metrics/update_service.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/app/services/projects/prometheus/metrics/update_service.rb b/app/services/projects/prometheus/metrics/update_service.rb deleted file mode 100644 index 9b51f4ab47d..00000000000 --- a/app/services/projects/prometheus/metrics/update_service.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -module Projects - module Prometheus - module Metrics - class UpdateService < Metrics::BaseService - def execute - metric.update!(params) - schedule_alert_update if requires_alert_update? - metric - end - - private - - def requires_alert_update? - has_alert? && (changing_title? || changing_query?) - end - - def changing_title? - metric.previous_changes.include?(:title) - end - - def changing_query? - metric.previous_changes.include?(:query) - end - end - end - end -end |