diff options
Diffstat (limited to 'app/services/clusters/applications/schedule_update_service.rb')
-rw-r--r-- | app/services/clusters/applications/schedule_update_service.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/clusters/applications/schedule_update_service.rb b/app/services/clusters/applications/schedule_update_service.rb index 4f130f76b87..4fabf1d809e 100644 --- a/app/services/clusters/applications/schedule_update_service.rb +++ b/app/services/clusters/applications/schedule_update_service.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +# DEPRECATED: To be removed as part of https://gitlab.com/groups/gitlab-org/-/epics/5877 module Clusters module Applications class ScheduleUpdateService @@ -7,14 +8,14 @@ module Clusters attr_accessor :application, :project - def initialize(application, project) - @application = application + def initialize(cluster_prometheus_adapter, project) + @application = cluster_prometheus_adapter&.cluster&.application_prometheus @project = project end def execute return unless application - return unless application.managed_prometheus? + return if application.externally_installed? if recently_scheduled? worker_class.perform_in(BACKOFF_DELAY, application.name, application.id, project.id, Time.current) |